Mam PDF
Mam PDF
Mam PDF
Microsoft excel is an electronic spreadsheet. You can use it to organize your data
into rows and columns. You can also use it to perform mathematical calculations
quickly. This course teaches microsoft excel basics as a prelude to the use of statistical
analysis system (sas) software in carrying out more complex statistical analysis.
Although knowledge of how to navigate in a windows environment is helpful, this
manual is created for the computer novice.
At the end of the course, participants are expected to know how to use microsoft excel
to:
Accordingly, the course is divided into the following five (5) sections.
This section will introduce you to the excel window. To begin this section, start
microsoft excel 2007 as follows:
1
The microsoft excel window appears and your screen looks similar to the one shown
here.
In the upper-left corner of the excel 2007 window is the microsoft office button. When
you click the button, a menu appears. You can use the menu to create a new file, open
an existing file, save a file, print and perform many other tasks.
1.3 The quick access toolbar
Next to the microsoft office button is the quick access toolbar. The quick access
toolbar gives you quick access to commands you frequently use.
1.4 The title bar
Next to the quick access toolbar is the title bar. On the title bar, microsoft excel
displays the name of the workbook you are currently using. At the top of the excel
window, you should see "Book 1 - microsoft excel" Or a similar name.
1.5 The ribbon
In microsoft excel 2007, you use the ribbon to issue commands. The ribbon is located
near the top of the excel window, below the quick access toolbar.
2
1.6 Worksheets
Microsoft excel consists of worksheets. Each worksheet contains columns and rows.
The columns are lettered a to z and then continuing with aa, ab, ac and so on; the rows
are numbered 1 to 1,048,576.
The combination of a column coordinate and a row coordinate make up a cell address.
For example, the cell located in the upper-left corner of the worksheet is cell a1,
meaning column a, row 1. Cell e10 is located under column e on row 10. You enter
your data into the cells on the worksheet.
1.7 The formula bar
If the formula bar is turned on, the cell address of the cell you are in displays in the
name box which is located on the left side of the formula bar. Cell entries display
on the right side of the formula bar.
3
1.8 The status bar
The status bar appears at the very bottom of the excel window and provides such
information as the sum, average, minimum, and maximum value of selected numbers.
1.9 Move around a worksheet
By using the arrow keys, you can move around your worksheet. You can use the
down arrow key to move downward one cell at a time. You can use the up arrow
key to move upward one cell at a time. You can use the tab key to move across the
page to the right, one cell at a time. You can hold down the shift key and then press
the tab key to move to the left, one cell at a time. You can use the right and left arrow
keys to move right or left one cell at a time. The page up and page down keys move up
and down one page at a time. If you hold down the ctrl key and then press the home
key, you move to the beginning of the worksheet.
1.10 Exercise 1
Move around the worksheet using the down and up arrow keys, the right and left
arrow keys, the tab key, the page up and page down keys and the (ctrl) home key.
1.11 Go to cells quickly
The following are shortcuts for moving quickly from one cell in a worksheet to a cell
in a different part of the worksheet.
1.12 Exercise 2
go to -- f5
1. Press f5. The go to dialog box opens.
2. Type j3 in the reference field.
3. Press enter. Excel moves to cell j3.
4
Go to -- ctrl+g
1. Hold down the ctrl key while you press "G" (ctrl+g). The go to dialog box
opens.
2. Type c4 in the reference field.
3. Press enter. Excel moves to cell c4.
Go to -- the name box
You can also use the name box to go to a specific cell. Just type the cell you want to
go to in the name box and then press enter.
If you wish to perform a function on a group of cells, you must first select those cells
by highlighting them. The exercises that follow teach you how to select.
5
1.14 Exercise 3
select cells – f8
To select cells a1 to e7:
1. Go to cell a1.
2. Press the f8 key. This anchors the cursor.
3. Note that "Extend selection" Appears on the status bar in the lower-left corner
of the window. You are in the extend mode.
4. Click in cell e7. Excel highlights cells a1 to e7.
5. Press esc and click anywhere on the worksheet to clear the highlighting.
Alternative method: Select cells by dragging
1. Go to cell a1.
2. Press the left mouse button.
3. While holding down the left mouse button, use the mouse to move from cell
a1 to c5.
4. Release the left mouse button.
5. Hold down the ctrl key until step 9.
6. Using the mouse, place the cursor in cell d7.
7. Press the left mouse button.
8. While holding down the left mouse button, move to cell f10. Release the left
mouse button.
9. Release the ctrl key. Cells a1 to c5 and cells d7 to f10 are selected. 10.press
esc and click anywhere on the worksheet to remove the highlighting.
1.15 Enter data
In this section, you will learn how to enter data into your worksheet. First, place the
cursor in the cell in which you want to start entering data. Type some data, and then
press enter. If you need to delete, press the backspace key to delete one character at a
time.
6
1.16 Exercise 4
enter data
7
Alternate method: Edit a cell by double-clicking in the cell
You can change "Joker" To "Johnson" As follows:
8
1. Move to cell a2.
2. Type text too long to fit.
3. Press enter.
6. Click the wrap text button . Excel wraps the text in the cell.
1.21 Delete a cell entry
To delete an entry in a cell or a group of cells, you place the cursor in the cell or
select the group of cells and press delete.
1.22 Exercise 7
delete a cell entry
1. Select cells a1 to a2.
2. Press the delete key.
1.23 Save a file
This is the end of section 1. To save your file:
1. Click the office button. A menu appears.
2. Click save. The save as dialog box appears.
3. Go to the directory in which you want to save your file.
4. Type section1 in the file name field.
5. Click save. Excel saves your file.
1.24 Close excel
Close microsoft excel.
1. Click the office button. A menu appears.
2. Click close. Excel closes.
9
Section 2: Entering excel formulas and formatting data
Section 1 familiarized you with the excel 2007 window, taught you how to move
around the window, and how to enter data. A major strength of excel is that you can
perform mathematical calculations and format your data. In this section, you will
learn how to perform basic mathematical calculations and how to format textand
numerical data. To start this section, open excel.
2.1 Perform mathematical calculations
In microsoft excel, you can enter numbers and mathematical formulas into cells.
Whether you enter a number or a formula, you can reference the cell when you
perform mathematical calculations such as addition, subtraction, multiplication, or
division. When entering a mathematical formula, precede the formula with an equal
(=) sign. Use the following to indicate the type of calculation you wish to perform:
+ addition
– subtraction
* multiplication
/ division
^ exponential
In the following exercises, you practice some of the methods you can use to perform
mathematical calculations.
2.2 Exercise 1
2.2.1 Addition, subtraction, multiplication and division of numbers
1. Type: Add, subtract, multiply, and divide in cells a1, b1, c1, and d1
respectively
2. Type: 12, 25, 11 and 75 in cells a2, b2, c2 and d2 respectively
3. Type: 8, 13, 6 and 5 in cells a3, b3, c3 and d3 respectively
4. Type: = a2 + a3 in cell a5 and press enter
5. Type: = b2 + b3 in cell a5 and press enter
6. Type: = c2 + c3 in cell a5 and press enter
7. Type: = d2 + d3 in cell a5 and press enter
10
When creating formulas, you can reference cells and include numbers. All of the
following formulas are valid:
(a) =a2/b2; (b) =a2+12-b3; (c) =a2*b2+12; (d) =24+53/b2
To change the order of calculation, use parentheses. Microsoft excel calculates the
information in parentheses first.
1. Double-click in cell a7.
2. Edit the cell to read =(3+3+12)/2*4.
3. Press enter.
Note: Microsoft excel adds 3 plus 3 plus 12, divides the answer by 2, and then
multiplies the result by 4. The answer, 36, displays in cell a7.
2.4 Autosum
You can use the autosum button on the home tab to automatically add a column
or row of numbers. When you press the autosum button , excel selects the
numbers it thinks you want to add. If you then click the check mark on the formula bar
or press the enter key, excel adds the numbers. If excel's guess as to which numbers
you want to add is wrong, you can select the cells you want.
11
2.5 Exercise 3
autosum
The following illustrates autosum:
1. Go to cell f1.
2. Type 3.
3. Press enter. Excel moves down one cell.
4. Type 3.
5. Press enter. Excel moves down one cell.
6. Type 3.
7. Press enter. Excel moves down one cell to cell f4.
8. Choose the home tab.
9. Click the autosum button in the editing group. Excel selects cells f1
through f3 and enters a formula in cell f4.
10. Press enter. Excel adds cells f1 through f3 and displays the result in cell f4.
Note that you can click on the arrow next to autosum to access other automatic
calculations like average, minimum and maximum values, count numbers, etc.
12
2.6 Align cell entries
When you type text into a cell, by default your entry aligns with the left side of the
cell. When you type numbers into a cell, by default your entry aligns with the right
side of the cell. You can change the cell alignment. You can center, left-align, or right-
align any cell entry. Look at cells a1 to d1. Note that they are aligned with the left side
of the cell.
2.7 Exercise 4
To center cells a1 to d1:
5. Click the paste button . Excel moves the contents of cells d9 to d12 to
cells g1 to g4.
2.9 Insert and delete columns and rows
You can insert and delete columns and rows. When you delete a column, you delete
everything in the column from the top of the worksheet to the bottom of the
worksheet. When you delete a row, you delete the entire row from left to right.
Inserting a column or row inserts a completely new column or row.
2.10 Exercise 5
Insert and delete columns and rows
To delete columns f and g:
15
1. Move to cell a6.
2. Type now is the time for all good men to go to the aid of their army.
3. Press enter. Everything that does not fit into cell a6 spills over into the adjacent
cell.
16
Change a column width by dragging
You can also change the column width with the cursor.
1. Place the mouse pointer on the line between the b and c column headings. The
mouse pointer should look like the one displayed here , with two arrows.
2. Move your mouse to the right while holding down the left mouse button. The
width indicator appears on the screen.
3. Release the left mouse button when the width indicator shows approximately
20. Excel increases the column width to 20.
Change a column width by autofit column width
1. Select the column or column you want to change the column width.
2. Choose the home tab.
3. Click the down arrow next to format in the cells group.
4. Click on autofit column width. You should now be able to see all of the text.
2.15 Format numbers
You can format the numbers you enter into microsoft excel. For example, you can add
commas to separate thousands, specify the number of decimal places, place a dollar
sign in front of a number, or display a number as a percent.
2.16 Exercise 8
17
7. Click the comma style button . Excel separates thousands with a comma.
8. Click the accounting number format button . Excel adds a dollar sign to
your number.
9. Click twice on the increase decimal button to change the number format
to four decimal places.
10. Click the decrease decimal button , if you wish to decrease the number of
decimal places.
Change a decimal to a percent.
This is the end of section 2. You can save and close your file. See section 1
(subsections 1.23 and 1.24) to learn how to save and close a file.
18
Section 3: Creating excel functions, filling cells, and printing
By using functions, you can quickly and easily make many useful calculations,
such as finding an average, the highest number, the lowest number, and a count of the
number of items in a list. Microsoft excel has many functions that you can use.
3.1 Using reference operators
To use functions, you need to understand reference operators. Reference operators
refer to a cell or a group of cells. There are two types of reference operators: Range
and union.
A range reference refers to all the cells between and including the reference. A range
reference consists of two cell addresses separated by a colon. The reference a1:A3
includes cells a1, a2, and a3. The reference a1:C3 includes cells a1, a2, a3, b1, b2, b3,
c1, c2, and c3.
A union reference includes two or more references. A union reference consists of two
or more numbers, range references, or cell addresses separated by a comma. The
reference a7,b8:B10,c9,10 refers to cells a7, b8 to b10, c9 and the number 10.
3.2 Understanding functions
Functions are prewritten formulas. Functions differ from regular formulas in that you
supply the value but not the operators, such as +, -, *, or /. For example, you can use
the sum function to add. When using a function, remember the following:
1. Use an equal sign to begin a formula.
2. Specify the function name.
3. Enclose arguments within parentheses. Arguments are values on which you
want to perform the calculation. For example, arguments specify the numbers
or cells you want to add.
4. Use a comma to separate arguments.
Here is an example of a function:
=sum(2,13,a1,b2:C7)
In this function, known as the sum function:
1. The equal sign begins the function.
2. Sum is the name of the function.
3. 2, 13, a1, and b2:C7 are the arguments. Parentheses enclose the arguments.
4. Commas separate the arguments.
After you type the first letter of a function name, the autocomplete list appears. You
can double-click on an item in the autocomplete list to complete your entry quickly.
Excel will complete the function name and enter the first parenthesis.
19
3.3 Exercise 1
functions
The sum function adds argument values.
20
12. Type c1:C3 in the number1 field, if it does not automatically appear.
13.click ok. The sum of cells c1 to c3, which is 300, appears.
You can use the max function to find the highest number in a series of numbers.
You can use the count function to count the number of numbers in a series.
22
3.8 Fill cells automatically
You can use microsoft excel to fill cells automatically with a series. For example, you
can have excel automatically fill your worksheet with days of the week, months of
the year, years, or other types of series.
3.9 Exercise 2
(a) Fill cells automatically
The following demonstrates filling the days of the week:
23
(b) Fill times
The following demonstrates filling time:
1. Type 1:00 into cell c1.
2. Grab the fill handle and drag with your mouse to highlight cells c1 to c14.
Note that each cell fills, using military time.
3. Press esc and then click anywhere on the worksheet to remove the
highlighting.
To change the format of the time:
1. Select cells c1 to c14.
2. Choose the home tab.
3. Click the down arrow next to the number format box . A menu
appears.
4. Click time. Excel changes the format of the time.
1. Go to cell e1.
2. Type section 1.
3. Grab the fill handle and drag with your mouse to highlight cells e1 to e14. The
cells fill in as a series: Section 1, section 2, section 3, and so on.
24
3.11 Exercise 3
Set the page layout (margins)
3.12 Print
The simplest way to print is to click the office button, highlight print on the menu
that appears, and then click quick print in the preview and print the document pane.
Dotted lines appear on your screen, and your document prints. The dotted lines
indicate the right, left, top, and bottom edges of your printed pages. To print from
microsoft excel, you can proceed as follows:
1. Click on microsoft office button
2. Highlight or point the mouse on print.
3. Click on print.
4. In the name box, under printer option, choose an appropriate printer.
5. Under the print range option, choose appropriate range of pages to be
printed.
6. Under copies option, choose appropriate number of copies of each page to
be printed.
7. Click on ok when ready.
3.13 Exercise 4
print preview
26
3. Click print preview. The print preview window appears, with your document
in the center.
3.14 Exercie 5
print
To create the column chart shown above, start by creating the worksheet below
exactly as shown.
28
After you have created the worksheet, you are ready to create your chart.
4.2 Exercise 1
create a column chart
.
1. Select cells a3 to d6. You must select all the cells containing the data you
want in your chart. You should also include the data labels.
2. Choose the insert tab.
3. Click the column button in the charts group. A list of column chart sub-types
types appears.
4. Click the clustered column chart sub-type. Excel creates a clustered column
chart and the chart tools context tabs appear.
4.3 Apply a chart layout
Context tabs are tabs that only appear when you need them. Called chart tools, there
are three chart context tabs: Design, layout, and format. The tabs become available
when you create a new chart or when you click on a chart. You can use these tabs to
customize your chart.
29
4.4 Exercise 2
apply a chart layout
30
4. Click style 42. Excel applies the style to your chart.
syntax:
sumif(range,criteria,sum_range)
Example
31
5.2 The averageif function
Returns the average (arithmetic mean) of all the cells in a range that meet a given
criteria.
Syntax-averageif(range,criteria,average_range)
Counts the number of cells within a range that meet the given criteria.
Syntax: Countif(range,criteria)
5.4
5.5
32
5.7 The if function
Returns one value if a condition you specify evaluates to true and another value if it
evaluates to false.
Syntax
if(logical_test,value_if_true,value_if_false)
Example
Returns true if all its arguments are true; returns false if one or more argument is
false.
Syntax
and(logical1,logical2, ..)
Logical1, logical2, ... Are 1 to 255 conditions you want to test that can be either
true or false.
Example
33
Using pivottables and charts
To create a pivottable
3. On the data menu select get external data and click import text file.
4. Navigate to the file you wish to import (results.txt for the lab).
34
8. Click finish on step three to accept the general
data format and complete the wizard.
11. Click next, to accept the analysis of excel data using a pivottable.
12. You can click next on step 2, because you selected the range
for the pivottable before starting the wizard.
35
15. Drag and drop gender from the pivottable dialog to the drop column
fields here range.
16. Drag and drop age from the pivottable dialog to the drop row fields here
range.
17. Drag and drop ownpc from the pivottable dialog to the drop data items
here range.
18. Right click on the age button in cell a4 select group and outline and
select group.
20. Make sure 10 is in the by box and click ok. This will group the ages
with ten years in each division.
Your pivot table now shows the number of women and men by age
group that own computers. You also wish to quantify the
percentage of women that own computers at each age group. A
few simple calculations will display the answer to this question for
you as well.
24. Click on the fill handle in cell e5 and drag it to cell e11
and drop it. This replicates the formula for the rest of the
rows.
2. The wizard makes a best guess as to the chart type and the
formatting characteristics. Right click on the chart and select
chart type to bring up the chart type dialog.
3. You may select different chart types and then press the press
and hold to view sample button to see what your data would
look like in that format.
You
may
37
customize the pivotchart as you see fit. Keep in mind that you may also
change the underlying pivottable by dragging and dropping fields from
the pivottable dialog on to or off of the chart. Any fields that appear on
the chart with a drop down arrow on them will allow you to turn off the
display of individual data items in them. You could have this chart
show just the women that owned pcs using this feature.
1. With the appropriate sheet active select save as web page from the File menu.
2. Select desktop as the saving location and type in the name for
your page in the file name box.
3. Select the selection radio button and check the add interactivity check
box.
38