Ms XL
Ms XL
Ms XL
Spreadsheets and databases are in competition and have similar features. Yet the way
they work in the background is different. When you work in a spreadsheet, you view the
data you are entering as a section. In a database, you only see the data you are entering--
you have to request a report or different display to see more of the information. Other
differences are: (1) databases are more often used for applications with long textual
entries, (2) very large applications (thousands of entries) are more often handled in
databases; and (3) spreadsheets are easier to learn to use and get calculations from than a
database program. This latter reason is why many researchers and students prefer
spreadsheets for keeping track of their data over databases.
The capacities of Excel are as follows. You can have 256 columns of information. You
can have up to 16,384 rows. That comes out to over 4,194,000,000 cells of information
and that's only on the first sheet!!! You can have 16 sheets of information in one
workbook, and the number of sheets can be increased, if needed. Excel refers to each file
as a workbook, because there can be multiple sheets (pages) in one file.
You will want to load Excel at this time to continue this first lesson. Double-click on the
Excel icon to start the program.
1 Spreadsheet Basic
Excel allows you to create spreadsheets much like paper ledgers that can perform
automatic calculations. Each Excel file is a workbook that can hold many worksheets.
The worksheet is a grid of columns (designated by letters) and rows (designated by
numbers). The letters and numbers of the columns and rows (called labels) are displayed
in gray buttons across the top and left side of the worksheet. The intersection of a column
and a row is called a cell. Each cell on the spreadsheet has a cell address that is the
column letter and the row number. Cells can contain either text, numbers, or
mathematical formulas.
This toolbar is located just below the menu bar at the top of the screen and
allows you to quickly access basic Excel commands.
New - Select File|New from the menu bar, press CTRL+N, or click the
New button to create a new workbook.
Open - Click File|Open from the menu bar, press CTRL+O, or click the
Open folder button to open an existing workbook.
Save - The first time you save a workbook, select File|Save As and name
the file. After the file is named click File|Save, CTRL+S, or the Save
button on the standard toolbar.
Print Preview - This feature will allow you to preview the worksheet
before it prints.
Spell Check - Use the spell checker to correct spelling errors on the
worksheet.
Cut, Copy, Paste, and Format Painter - These actions are explained in
the Modifying A Worksheet section.
Undo and Redo - Click the backward Undo arrow to cancel the last
action you performed, whether it be entering data into a cell, formatting a
cell, entering a function, etc. Click the forward Redo arrow to cancel the
undo action.
Zoom - To change the size that the worksheet appears on the screen,
choose a different percentage from the Zoom menu.
2. Customizing Excel
Menus
Unlike previous versions of Excel, the menus in Excel 2000 initially list only the
commands you have recently used. To view all options in each menu, click the
double arrows at the bottom of the menu. If you would like to revert to the way
older versions of Excel displayed menu options, follow these steps:
Toolbars
Many toolbars displaying shortcut buttons are available. Select View|Toolbars from the
menu bar to select more toolbars.
Customize Toolbars
Customizing toolbars allows you to delete certain shortcut buttons from a toolbar if you
do not use them and add the shortcut buttons for commands you use often.
Recording A Macro
Macros can speed up any common editing sequence you may execute in an Excel
spreadsheet. In this example we will make a simple macro that will set all the margins on
the page to one inch.
▪ Name the macro in the Macro name field. The name cannot contain spaces and
must not begin with a number.
▪ If you would like to assign a shortcut key to the macro for easy use, enter the
letter under Shortcut key. Enter a lower case letter to make a CTRL+number
shortcut and enter an upper case letter to assign a CTRL+SHIFT+number shortcut
key. If you select a shortcut key that Excel already uses, your macro will
overwrite that function.
▪ Select an option from the Store macro in drop-down menu.
▪ Enter a description of the macro in the Description field. This is for your
reference only so you remember what the macro does.
▪ Click OK when you are ready to start recording.
▪ Select options from the drop down menus and Excel will record the options you
choose from the dialog boxes, such as changing the margins on the Page Setup
window. Select File|Page Setup and change all the margins to 1". Press OK.
Replace this step with whatever commands you want your macro to execute.
Select only options that modify the worksheet. Toggle actions such as
View|Toolbars that have no effect on the worksheet will not be recorded.
▪ Click the Stop button the recording toolbar. The macro is now saved.
Running A Macro
▪ To run a macro you have created, select Tools|Macro|Macros from the menu bar.
▪ From the Macros window, highlight the Macro name in the list and click Run.
▪ If the macro is long and you want to stop it while it is running, press BREAK
(hold CTRL and press PAUSE).
3. Modifying a Spread Sheet
Use the mouse to select a cell you want to begin adding data to and use the keyboard
strokes listed in the table below to move through the cells of a worksheet.
▪ Resize a row by dragging the line below the label of the row you would like to
resize. Resize a column in a similar manner by dragging the line to the right of
the label corresponding to the column you want to resize.
- OR -
▪ Click the row or column label and select Format|Row|Height or
Format|Column|Width from the menu bar to enter a numerical value for the
height of the row or width of the column.
Selecting Cells
Before a cell can be modified or formatted, it must first be selected (highlighted). Refer
to the table below for selecting groups of cells.
To activate the contents of a cell, double-click on the cell or click once and press F2.
Moving Cells
To cut cell contents that will be moved to another cell select Edit|Cut
from the menu bar or click the Cut button on the standard toolbar.
Copying Cells
To copy the cell contents, select Edit|Copy from the menu bar or click the
Copy button on the standard toolbar.
Freeze Panes
If you have a large worksheet with column and row headings, those headings will
disappear as the worksheet is scrolled. By using the Freeze Panes feature, the headings
can be visible at all times.
▪ Click the label of the row below the row that should remain frozen at the top of
the worksheet.
▪ Select Window|Freeze Panes from the menu bar.
Freeze panes has been added to row 1 in the image above. Notice that the row
numbers skip from 1 to 6. As the worksheet is scrolled, row 1 will remain
stationary while the remaining rows will move.
4. Formatting cells
Formatting Toolbar
The contents of a highlighted cell can be formatted in many ways. Font and cell attributes
can be added from shortcut buttons on the formatting bar. If this toolbar is not already
visible on the screen, select View|Toolbars|Formatting from the menu bar.
For a complete list of formatting options, right-click on the highlighted cells and choose
Format Cells from the shortcut menu or select Format|Cells from the menu bar.
▪ Number tab - The data type can be selected from the options on this tab. Select
General if the cell contains text and number, or another numerical category if the
cell is a number that will be included in functions or formulas.
▪ Alignment tab - These options allow you to change the position and alignment of
the data with the cell.
▪ Font tab - All of the font attributes are displayed in this tab including font face,
size, style, and effects.
▪ Border and Pattern tabs - These tabs allow you to add borders, shading, and
background colors to a cell.
Dates and Times
If you enter the date "January 1, 2001" into a cell on the worksheet, Excel will
automatically recognize the text as a date and change the format to "1-Jan-01". To change
the date format, select the Number tab from the Format Cells window. Select "Date"
from the Category box and choose the format for the date from the Type box. If the field
is a time, select "Time" from the Category box and select the type in the right box. Date
and time combinations are also listed. Press OK when finished.
Styles
The use of styles in Excel allow you to quickly format your worksheet, provide
consistency, and create a professional look. Select the Styles drop-down box from the
formatting toolbar (it can be added by customizing the toolbar). Excel provides several
preset styles:
▪ Comma - Adds commas to the number and two digits beyond a decimal point.
▪ Comma [0] - Comma style that rounds to a whole number.
▪ Currency - Formats the number as currency with a dollar sign, commas, and two
digits beyond the decimal point.
▪ Currency [0] - Currency style that rounds to a whole number.
▪ Normal - Reverts any changes to general number format.
▪ Percent - Changes the number to a percent and adds a percent sign.
▪ Select the cell on the worksheet containing the formatting you would like to set as
a new style.
▪ Click the Style box on the Formatting toolbar so the style name is highlighted.
▪ Delete the text in the Style box and type the name of the new style.
▪ Press ENTER when finished.
Format Painter
A handy feature on the standard toolbar for formatting text is the Format Painter. If you
have formatted a cell with a certain font style, date format, border, and other formatting
options, and you want to format another cell or group of cells the same way, place the
cursor within the cell containing the formatting you want to copy. Click the Format
Painter button in the standard toolbar (notice that your pointer now has a paintbrush
beside it). Highlight the cells you want to add the same formatting to.
To copy the formatting to many groups of cells, double-click the Format Painter button.
The format painter remains active until you press the ESC key to turn it off.
AutoFormat
Excel has many preset table formatting options. Add these styles by following these
steps:
▪ Click the Options... button to select the elements that the formatting will apply to.
▪ Click OK when finished.
1. Formulas and functions
The distinguishing feature of a spreadsheet program such as Excel is that it allows you to
create mathematical formulas and execute functions. Otherwise, it is not much more than
a large table for displaying text. This page will show you how to create these
calculations.
Formulas
Formulas are entered in the worksheet cell and must begin with an equal sign "=". The
formula then includes the addresses of the cells whose values will be manipulated with
appropriate operands placed in between. After the formula is typed into the cell, the
calculation executes immediately and the formula itself is visible in the formula bar. See
the example below to view the formula for calculating the sub total for a number of
textbooks. The formula multiplies the quantity and price of each textbook and adds the
subtotal for each book.
Linking Worksheets
You may want to use the value from a cell in another worksheet within the same
workbook in a formula. For example, the value of cell A1 in the current worksheet and
cell A2 in the second worksheet can be added using the format "sheetname!celladdress".
The formula for this example would be "=A1+Sheet2!A2" where the value of cell A1 in
the current worksheet is added to the value of cell A2 in the worksheet named "Sheet2".
Relative, Absolute, and Mixed Referencing
Calling cells by just their column and row labels (such as "A1") is called relative
referencing. When a formula contains relative referencing and it is copied from one cell
to another, Excel does not create an exact copy of the formula. It will change cell
addresses relative to the row and column they are moved to. For example, if a simple
addition formula in cell C1 "=(A1+B1)" is copied to cell C2, the formula would change
to "=(A2+B2)" to reflect the new row. To prevent this change, cells must be called by
absolute referencing and this is accomplished by placing dollar signs "$" within the cell
addresses in the formula. Continuing the previous example, the formula in cell C1 would
read "=($A$1+$B$1)" if the value of cell C2 should be the sum of cells A1 and B1. Both
the column and row of both cells are absolute and will not change when copied. Mixed
referencing can also be used where only the row OR column fixed. For example, in the
formula "=(A$1+$B2)", the row of cell A1 is fixed and the column of cell B2 is fixed.
Basic Functions
Function Wizard
View all functions available in Excel by using the Function Wizard.
▪ Activate the cell where the function will be placed and click the Function
Wizard button on the standard toolbar.
▪ From the Paste Function dialog box, browse through the functions by clicking in
the Function category menu on the left and select the function from the
Function name choices on the right. As each function name is highlighted a
description and example of use is provided below the two boxes.
▪ Click OK when all the cells for the function have been selected.
Autosum
Use the Autosum function to add the contents of a cluster of adjacent cells.
▪ Select the cell that the sum will appear in that is outside the cluster of cells whose
values will be added. Cell C2 was used in this example.
▪ Click the Autosum button (Greek letter sigma) on the standard toolbar.
▪ Highlight the group of cells that will be summed (cells A2 through B2 in this
example).
▪ Press the ENTER key on the keyboard or click the green check mark button on
the formula bar .
To execute a basic descending or ascending sort based on one column, highlight the cells
that will be sorted and click the Sort Ascending (A-Z) button or Sort Descending (Z-A)
button on the standard toolbar.
Complex Sorts
▪ If the cells you highlighted included the text headings in the first row, mark My
list has...Header row and the first row will remain at the top of the worksheet.
▪ Click the Options button for special non-alphabetic or numeric sorts such as
months of the year and days of the week.
The Autofill feature allows you to quickly fill cells with repetitive or sequential data such
as chronological dates or numbers, and repeated text.
▪ Type the beginning number or date of an incrementing series or the text that will
be repeated into a cell.
▪ Select the handle at the bottom, right corner of the cell with the left mouse button
and drag it down as many cells as you want to fill.
▪ Release the mouse button.
If you want to autofill a column with cells displaying the same number or date you must
enter identical data to two adjacent cells in a column. Highlight the two cells and drag the
handle of the selection with the mouse.
The Autofill feature can also be used for alternating text or numbers. For example, to
make a repeating list of the days of the week, type the seven days into seven adjacent
cells in a column. Highlight the seven cells and drag down with the mouse.
Autofilling Functions
Autofill can also be used to copy functions. In the example below, column A and column
B each contain lists of numbers and column C contains the sums of columns A and B for
each row. The function in cell C2 would be "=SUM(A2:B2)". This function can then be
copied to the remaining cells of column C by activating cell C2 and dragging the handle
down to fill in the remaining cells. The autofill feature will automatically update the row
numbers as shown below if the cells are reference relatively.
Charts
Chart Wizard
The Chart Wizard brings you through the process of creating a chart by displaying a
series of dialog boxes.
▪ Enter the data into the worksheet and highlight all the cells that will be included
in the chart including headers.
▪ Click the Chart Wizard button on the standard toolbar to view the first Chart
Wizard dialog box.
▪ Chart Type - Choose the Chart type and the Chart subtype if necessary. Click
Next.
▪ Chart Source Data - Select the data range (if different from the area highlighted
in step 1) and click Next.
▪ Chart Options - Enter the name of the chart and titles for the X- and Y-axes.
Other options for the axes, grid lines, legend, data labels, and data table can be
changed by clicking on the tabs. Press Next to move to the next set of options.
▪ Chart Location - Click As new sheet if the chart should be placed on a new,
blank worksheet or select As object in if the chart should be embedded in an
existing sheet and select the worksheet from the drop-down menu.
To resize the chart, click on its border and drag any of the nine black handles to change
the size. Handles on the corners will resize the chart proportionally while handles along
the lines will stretch the chart.
Select the border of the chart, hold down the left mouse button, and drag the chart to a
new location. Elements within the chart such as the title and labels may also be moved
within the chart. Click on the element to activate it, and use the mouse to drag the
element to move it.
Chart Formatting Toolbar
Chart Objects List - To select an object on the chart to format, click the
object on the chart or select the object from the Chart Objects List and
click the Format button. A window containing the properties of that
object will then appear to make formatting changes.
Chart Type - Click the arrowhead on the chart type button to select a
different type of chart.
Legend Toggle - Show or hide the chart legend by clicking this toggle
button.
Data Table view - Display the data table instead of the chart by clicking
the Data Table toggle button.
Angle Text - Select the category or value axis and click the Angle
Downward or Angle Upward button to angle the the selected by +/- 45
degrees.
A finished chart can be copied into a Microsoft Word document. Select the chart and
click Copy. Open the destination document in Word and click Paste.
1. Paper properties and printing
Page Breaks
To set page breaks within the worksheet, select the row you want to appear just below the
page break by clicking the row's label. Then choose Insert|Page Break from the menu
bar. You may need to click the double down arrow at the bottom of the menu list to view
this option.
Page Setup
Select File|Page Setup from the menu bar to format the page, set margins, and add
headers and footers.
▪ Page
Select the Orientation under the Page tab in the Page Setup window to make the
page Landscape or Portrait. The size of the worksheet on the page can also be
formatting under Scaling. To force a worksheet to print only one page wide so all
the columns appear on the same page, select Fit to 1 page(s) wide.
▪ Margins
Change the top, bottom, left, and right margins under the Margins tab. Enter
values in the header and footer fields to indicate how far from the edge of the
page this text should appear. Check the boxes for centering horizontally or
vertically on the page.
▪ Header/Footer
Add preset headers and footers to the page by clicking the drop-down menus
under the Header/Footer tab.
To modify a preset header or footer, or to make your own, click the Custom
Header and Custom Footer buttons. A new window will open allowing you to
enter text in the left, center, or right on the page.
Format Text - Click this button after highlighting the text to change the font,
size, and style.
Page Number - Insert the page number of each page.
Total Number of Pages - Use this feature along with the page number to create
strings such as "page 1 of 15".
Date - Add the current date.
Time - Add the current time.
File Name - Add the name of the workbook file.
Tab Name - Add the name of the worksheet's tab.
▪ Sheet
Check Gridlines if you want the gridlines dividing the cells to be printed on the
page. If the worksheet is several pages long and only the first page includes titles
for the columns, select Rows to repeat at top to choose a title row that will be
printed at the top of each page.
Print Preview
Select File|Print Preview from the menu bar to view how the worksheet will
print. Click the Next and Previous buttons at the top of the window to display
the pages and click the Zoom button to view the pages closer. Make page layout
modifications needed by clicking the Page Setup button. Click Close to return
to the worksheet or Print to continue printing.
Click OK to print.