1 Formatting

advertisement
Some Notes on EXCEL
TABLE OF CONTENTS
In Excel a file is called a work book and each page is worksheet.
If you click on office button, you can see the files that you recently worked.
1. Formatting .....................................................................................................................
2. Entering Mathematical Operations in Cells .............................................................. 4
3. Selecting Ranges ........................................................................................................... 4
To select a range that fits on a screen ......................................................................... 4
To select a range doesn’t fit on a screen ..................................................................... 5
Selecting more than one range ..................................................................................... 5
4. Using Range Names ..................................................................................................... 5
To create a range name ................................................................................................ 6
Applying Formulas to Ranges...................................................................................... 6
5. Inserting or Deleting Rows or Columns..................................................................... 7
To insert one or more blank rows ............................................................................... 7
To delete one or more rows .......................................................................................... 7
6. Filling a Series .............................................................................................................. 7
7. Copying and Pasting .................................................................................................... 7
To copy and paste using keyboard shortcuts ............................................................. 7
Using Absolute/relative references in Formulas when Copying/Pasting ................. 8
Copying And Paste A Formula Into Multiple Cells At Once (Using Ctrl-Enter) ... 9
Copying and Pasting with the Special/Values option .............................................. 10
Moving (cutting and pasting) ..................................................................................... 10
8. Some Useful Functions .............................................................................................. 11
Using the summation button ...................................................................................... 11
To use the COUNT and COUNTIF function ........................................................... 12
To use the AVERAGE function ................................................................................. 12
To use MAX and MIN functions ............................................................................... 13
Using IF functions ....................................................................................................... 13
Using nested IF functions ........................................................................................... 13
Using an AND condition in an IF function ............................................................... 14
To use an OR condition in an IF function ................................................................ 14
Using lookup functions ............................................................................................... 14
9. Using the paste function (fx) Button in the Top Toolbar ........................................ 16
10. Using Data Tables .................................................................................................... 16
11. Split Screen
12. Insert Charts
1
1 Formatting
Formula window, bold borders, adding notes, merging cells
1.1
Changing font size or font size
In the Font box on the Formatting toolbar, click the font you want.
In the Font Size box, click the font size you want.
1.2
Formatting cells
You can format an entire group of cells using the Format cells page. First select the
group of cells that you wish to format (section 3 details how to select cells). Then, click
Home>Format>Cells. Using this page you can format cells as general numbers,
monetary values, a date, text, etc…
2
1.3
Formatting Font
Excel allows you to format font in a spreadsheet similar to excel. Simply highlight the
font (or cells) that you wish to format and click on the appropriate box on the
Formatting toolbar. Below are some of the most commonly used formatting boxes:
Makes font within selected cells bold
Makes font within selected cells italicized
Changes the color of the font within selected cells. Click on the arrow to specify
the color.
Shades the background of the selected cells. Click on the arrow to specify the
color.
Places a border around the selected cells. Click on the arrow to specify the desired
border type.
1.4 Other Formatting activities






Sizing the cells, grab the line (horizontal or vertical and drag). If you want
to specify a precise column width, use the Column Width dialog box.
Alignment: ribbon > home > alignment group
Text Orientation: To change text orientation, select the cells whose
contents you want to rotate. Click the Orientation button in the Alignment
group on the Home tab of the Ribbon. A menu of orientation options
appears, with commands for angling the text at 45-degree angles
clockwise or counterclockwise, stacking the text vertically, or rotating the
text up or down.
Searching for data: The Find command locates data in a worksheet,
which is particularly helpful when a worksheet contains a large amount of
data; The Replace command is an extension of the Find command.
Replacing data substitutes new data for the data found. In the Editing
group on the Home tab of the Ribbon, click the Find & Select button, and
then click either Find or Replace: Ribbon > home > editing group > find
& Select.
Zoom either using the bar on the bottom of the sheet or ribbon > view >
zoom
Print and preview: on print menu you can select number of copies, the
sections you want to print etc.
3








Print area: Select the text that you want to print: Ribbon > Page Layout >
in page setup group select Print area
Format cells: right click > format cells > different options (wrap text,
merge, changing text orientation, borders, number formats,
Format Painter: select the cell that has the format > Click on format
painter on home, clipboard, brush > click on another cell or area that you
want to carry that format
Freezing Pane: Often a worksheet includes too much data to view on the
screen at one time. In order to keep the label line fixed when you scroll
down or keep the first row frozen: View > Freeze Panes
To clear all the formatting, select the cell or range, click Home > Editing
group > Clear Format
AutoFit determines the best width for a column or the best height for a
row, based on its contents. Place the pointer on the right edge of the
column heading (or below the row heading) until the pointer changes to a
double-headed arrow. Then, double-click to resize the column or row to
the best fit.
Spelling: Ribbon > Review > Proofing group > spelling
Header and footer: Ribbon > Insert > text grouping > header and footer.
When you type it will take you to layout view of the document. Click on
spreadsheet to get the header placed.
U
Performed
2 Entering Mathematical Operations in Cells
Excel allows you to enter any number, letter and/or character into a cell. You must let
excel know whether it needs to mathematically compute values opposed to listing items
exactly as you enter them. You must first enter = in a cell if you want Excel to compute a
value.
Enter 2 into cell A2 and 5 in cell A3. Then enter =A2+A3 in cell B2. Notice cell B2 has
the value 7.
3 Selecting Ranges
In Excel ranges are often selected for the purpose of copying/pasting, entering formulas,
deleting items, and so on. It’s easy to select a range when the entire range appears on the
screen. However, it is more frustrating to use traditional techniques (such as dragging)
when you can’t see the entire range. Below we review several efficient techniques for
completing this task.
3.1
To select a range that fits on a screen
Method 1: Click on one corner of the range and drag to the opposite corner.
4
Or:
Method 2: Click on one corner, hold down the Shift key, and click on the opposite
corner.
Try it! Create the spreadsheet below and select the range B2:D7
A
B
1
2
3
4
5
6
7
8
9
3.2
C
8
1
4
7
1
1
D
6
3
3
0
9
10
E
F
10
2
8
2
1
14
To select a range doesn’t fit on a screen
Click on one corner of the range, say, the upper left corner. Then, holding the Shift key
down, use the End-arrow combinations (End and right arrow, then, if necessary, End and
down arrow) to get to the opposite corner. [This is method 2 above]
3.3
Selecting more than one range
You can format more than one range at a time in Excel. This is particularly useful when
formatting cells with similar information across a spreadsheet.
Select the first range, press the Ctrl key, select the second range, and press the Ctrl key,
select the third range, and so on.
For example, to select the ranges A2:B4 and D2:E6, click on A2, hold down the Shift key
and click on B4 (so now the first range is selected), hold down the Ctrl key and click on
D2, and finally hold down the Shift key and click on E6.
Try it! Create the spreadsheet below, and select the two ranges below.
A
1
2
3
4
5
6
7
8
9
B
10
1
5
C
13
9
4
D
E
7
12
1
6
15
9
7
1
12
2
4 Using Range Names
Using range names
5
Range names are extremely useful for making your formulas more understandable.
Efficient use of range names takes some experience, but here are a few useful tips.
4.1
To create a range name
Select a range that you want to name. Then type the desired range name in the upper left
“name box” on the screen. (This box is just above the column “A” heading. It usually
shows the cell address, such as E13, where the cursor is.)
You could right click and choose “Define name,” and type the name. By the way, range
names are not case sensitive. For example, Revenue, revenue, and REVENUE can be
used interchangeably.
4.2
Applying Formulas to Ranges
Suppose you have a business and you want to determine the profits over the past 12
months. Each month you entered the monthly Revenues and Costs into separate columns
on a spreadsheet, and you now need to compute the profits.
Naturally, Profits = Revenues – Costs.
Try it! Create a spreadsheet below by entering the monthly revenues in range B3:B14.
Then name this range REVENUE. Next enter the monthly costs in range C3:C14 and
name this range COST. For each month you want that month’s revenue minus cost in the
appropriate cell in column D. You will get it correct if you select the range D3:D14, type
the formula =Revenues-Costs, and press Ctrl-Enter. If you click on any cell in this range,
you’ll see the formula =Revenues-Costs.
If this confuses you, you can always enter =B3-C3 and copy it down. Then you’re safe,
but you’ve lost the advantage of range names!
A
1
2
3
4
5
6
7
8
9
10
11
12
13
14
B
Revenues
$1,600
$2,000
$2,100
$2,900
$500
$1,700
$2,000
$2,500
$1,900
$2,100
$700
$2,600
C
D
Costs
$1,400
$1,800
$1,800
$2,800
$400
$1,500
$1,900
$2,300
$1,700
$2,000
$500
$2,400
E
F
Profits
6
5 Inserting or Deleting Rows or Columns
Often you want to insert or delete rows or columns. Note that deleting a row or column
is not the same as clearing the contents of a row or column. Deleting means erasing the
cells of all formulas, formatting, etc.
5.1
To insert one or more blank rows
Click on a row number and drag down as many rows as you want to insert, and then press
Alt-i and then r .
The rows you insert are inserted above the first row you selected. For example, if you
select rows 8 through 11 and then insert, four blank rows will be inserted between the old
rows 7 and 8.
Columns are inserted in the same way, except that the key sequence is Alt-i and then c.
Alternatively, a single row or column can be inserted by clicking on the menu items
Insert/Rows or Insert/Columns.
5.2
To delete one or more rows
Click on a row number and drag down as many rows as you want to delete, and then
press Alt-e and then d (the menu equivalent of Edit/Delete). Columns are deleted in
exactly the same way.
6
Filling a Series
Say you want to fill column A, starting in cell A2, with the values 1, 2, and so on up to
1000. Excel has a function that will allow you to fill in columns (or rows) with a series.
You can select the start value, end value, and the step value.
Enter the first value in the first cell (1 in cell A2). With the cursor in the starting cell
(A2), use the menu item Home/Editing/Fill/Series in to obtain a dialog box. Change the
Row setting to Column, make sure the Type setting is Linear, set the Step Value to 1
(since you want values to be incremented by 1), enter the final value (1000) in the Stop
Value box, and click on OK.
7 Copying and Pasting
Copying and pasting (usually formulas) is one of the most frequent tasks done in Excel.
Below we review several techniques for copying/pasting values, formulas, or specific
values created by formulas.
7.1
To copy and paste using keyboard shortcuts
Select the copy range (using one of the efficient selection methods described above),
press Ctrl-c (for copy), select the paste range (again, efficiently), and press Ctrl-v (for
paste).
The copy range will still have a dotted line around it. Press the Esc key to get rid of it.
7
7.2 Using Absolute/relative references in Formulas when
Copying/Pasting
A relative cell reference adjusts to its new location when copied or moved. Absolute cell
references do not change when moved or copied to anew cell. To create an absolute
reference, you insert a dollar sign ($) before the column letter and/or the row number of
the cell reference you want to stay the same.
Absolute and references are indicated in formulas by dollar signs or the lack of them, and
they dictate what happens when you copy or move a formula to a range. This is a crucial
concept for efficiency in spreadsheet operations, so you should take some time to
understand it thoroughly. Let’s say you want to multiply the contents of cell A2 by 2 and
enter the product in cell B2. Traditionally you would enter =A2*2 in cell B2.
Alternatively you could use absolute referencing and enter =$A$2*2 in cell B2.
Here are two things to remember: (1) The dollar signs are relevant only for the purpose of
copying or moving; they have no inherent effect on a formula. For example, the formulas
=A2*2 and =$A$2*2 in cell C3, produce exactly the same result. Their difference is
relevant only if cell C3 is copied or moved to some range. (2) There is never any need to
type the dollar signs. This can be done with the F4 key.
Create the spreadsheet below.
A
1
2
3
4
5
6
7
8
9
B
C
Fixed cost
Variable cost
$50
$2
Month
Units produced
Total cost
Jan
224
D
Feb
194
E
Mar
228
F
Apr
258
For any month the total cost = (fixed cost) + (units produced) * (Variable cost)
In cell B7 enter = B2 + B3*B6 and press ENTER. The value 498 will appear in cell B7.
Now copy cell B7, and go to cell C7 and paste its contents. Let’s discuss the results.

Excel displays the value 0 in cell C7.

Click on cell C7 and review the formula in this cell.
 C7 contains the formula C2 + C3 *C6.
 Excel changed the formula = B2 + B3*B6 into =C2 + C3 *C6.
LET UNDERSTAND WHY………………………….
Excel automatically adjusts formulas relative to the cell position where you are pasting it.
Since we want the fixed and variable costs to always reference the cells B2 and B3
respectively, we must use absolute referencing to keep these cell locations constant when
copying and pasting formulas (i.e., use dollar symbols when referencing cells B2 and
B3).
8
Now go back to cell B7 and enter = $B$2 + $B$3*B6 and press ENTER. The value 498
will still appear in cell B7. Now copy cell B7, and go to cell C7 and paste its contents.

Notice Excel now displays the value 438 in cell C7.

Click on cell C7 to review the formula in this cell. Notice that Excel
changed the formula = $B$2 + $B$3*B6 into =$B$2 + $B$3*C6. The
fixed and variable cost references remained constant. However, the
cell referencing the units produced adequately adjusted to the units
produced for February instead of January (which was originally
referenced when copied).
YOU CAN ALWAYS HIGHLIGHT A PORTION OF A FORMULA AND PRESS F4
KEY AND $ SYMBOLS WILL BE AUTOMATICALLY PLACED IN ALL CELL
REFERENCES.
In a nutshell, you should always remember to use absolute referencing when copying and
pasting formulas that contain cell references that you want to remain constant. I
STRONGLY SUGGEST THAT YOU PLAY WITH COPYING AND PASTING
USING ABSOLUTE REFERENCES UNTIL YOU COMPLETELY UNDERSTAND
THIS CONCEPT.
7.3
Copying And Paste A Formula Into Multiple Cells At Once (Using
Ctrl-Enter)
Below there are values entered in column A, and values entered in column B. Suppose
you want to enter the product of the value in column A and column B into column C, for
each row. You can always enter the formula manually into cell C2. Then copy cell C2
and paste its contents into cells C3:C8 (i.e., C3 through C8). However there is a more
efficient way to complete this task.
Select the range C3:C8. With the entire paste range selected, type the formula =A2*B2,
and press Ctrl-Enter instead of Enter. The Entire range will fill up with the appropriate
formulas.
A
1
2
3
4
5
6
7
8
B
6
9
4
7
2
8
3
C
D
2
1
9
6
3
5
9
Pressing Ctrl-Enter enters what you typed in all of the selected cells (adjusted for relative
addresses), so in general, it can be a real time saver. For example, it could be used to
9
enter the number 10 in a whole range of cells. Just select the range, type 10, and press
Ctrl-Enter.
7.4
Copying and Pasting with the Special/Values option
Often you have a range of cells that contains formulas. It is possible to paste the exact
values generated by the formulas in an alternate location on the spreadsheet, or even into
another worksheet altogether. Traditional cutting and pasting techniques will either alter
the precise values generated by the formulas or produce errors (when pasting into a new
worksheet).
Select the range with formulas, press Ctrl-c to copy, and select the range where you want
to paste the values (which could be the same as the copy range). Then select the
Edit/Paste Special menu item, and select the Values option.
Try it! Use the spreadsheet that you just created above. First try to use traditional method
(i.e., select the copy range, press ctrl + c, then select the paste range and press ctrl + v) to
paste the values in cells C2:C8 into cells E2:E8. Excel will display all zeros in the paste
range instead of the values 12, 9, 36, 42, 6, 40, 27.
Now select the copy range, and press ctrl + c. Next select the copy range and select the
Edit/Paste Special menu item, and select the Values option. The appropriate values
appear.
A
1
2
3
4
5
6
7
8
B
6
9
4
7
2
8
3
C
2
1
9
6
3
5
9
D
E
F
12
9
36
42
6
40
27
When you use the Paste Special function only values are pasted. The formulas that were
used to generate the values are not available in the pasted cells.
You might want to experiment with the other options on the Edit/Paste Special dialog
box. For example, if you have a set of labels entered as a row and you want this same set
of labels entered somewhere else as a column, try copying and pasting special with the
Transpose option.
7.5
Moving (cutting and pasting)
Select the range to be cut, press Ctrl-x (for cutting), select the upper left corner of the
paste range, and press Ctrl-v.
10
8 Some Useful Functions
A function formula contains three components: an equal sign, a function name, and an
argument. If a function has more than one argument, comma separates the arguments. An
example is =SUM(D5:D10)
The function can be types in the cell or can be inserted. When you type “=” in the cell,
you will see the drop down menu on the north corner of your screen. Choose the function
from there and the arguments are presented there
EXCEL has more than 300 function formula.
Functions:
 FV(rate,nper,pmt,pv,type): Displays the future value of a series of equal
payments (third argument), at a fixed rate (first argument), for a specified
number of periods (second argument), the fourth and fifth argument are
optional. FV(.8,5,100) displays the future value of five 100 payments at
the end of five years if you earn a rate of 8%.
 PMT(rate,nper,pv,fv,type) displays the payment per period needed to
repay the loan (3rd arg), at a specified rate (1st arg), for a specified number
of periods (2nd arg). Fourth and fifth arg are optional.
 PV(rate, nper, pmt, fv, type) displays the present value of a series of equal
payments (3rd arg), at a fixed rate (1st arg), for a specified number of
periods(2nd arg). Fourth and fifth arg are optional. PV(.1,5,500) shows the
current value of five payment of $500 at a 10% rate. When someone wants
to pay your debt by installment.
 NOW( ), displays the current date or time based on the computer’s clock.
Just type it in a cell
8.1
Using the summation button
The SUM function is used to sum across rows or columns that a toolbar button (the
button) is available to automate the procedure. To illustrate its use, suppose you have a
table of numbers in the range A2:D6. We can easily compute the sum of each row and
place results in range E2:E6, and compute the column sums and place results in the range
A7:D7.
Select the range(s) where you want the sums (E2:E6 and A7:D7–remember how to select
multiple ranges), and click on the summation button.
Note that if you select multiple cells, you get the sums automatically. If you select a
single cell (such as when you have a single column of numbers to sum), you’ll be shown
the sum formula “for your approval” and you’ll have to press Enter to actually enter it.
Why does Excel do it this way–your guess is as good as ours!
Try it! Use the summation button to fill in the row and column sums.
11
A
1
2
3
4
5
6
7
8
9
B
51
37
13
73
38
C
94
6
83
64
11
D
15
2
29
46
3
E
F
7
41
88
32
80
Alternatively you could enter the formula =SUM(range) into any cell where you want to
place results. You can manually enter a range [i.e., type =SUM (A2:D2)] or you may
enter =SUM( , then select the range, and then enter the closing parenthesis ).
There are many useful functions in Excel. You should become familiar with the ones
most useful to you (for example, financial analysts should learn the financial functions),
but here are a few everyone should know. (By the way, we capitalize the names of these
functions just for emphasis. However, they are not case sensitive. You can enter SUM
or sum, for example, with the same result.)
8.2 To use the COUNT (range) and COUNTIF (range, criteria)
function
Enter the formula =COUNT(range), where range is any range. This produces the
number of numerical values in the range.
There is a similar function, COUNTA, which counts all of the cells, numerical or
otherwise, in the range(s). For example, if cells A1, A2, and A3 contain Month, 1, and 2,
respectively, then =COUNT(A1:A3) yields 2, whereas =COUNTA(A1:A3) yields 3.
COUNTIF (range, criteria) finds the number of cells within arrange that meet specified
criteria
Try it! Use the COUNT and COUNTA functions to fill in cells E1 and E2.
A
1
2
3
4
5
6
7
8
9
8.3
B
C
Student ID Exam score
3416
62
6125
73
1535
74
2323 Absent
577
77
9044
57
8403
67
5892
90
D
E
Number enrolled
Number who took exam
To use the AVERAGE function
12
Enter the formula =AVERAGE (range) where range is any range. This produces the
average of the numerical values in the range.
Be aware that the AVERAGE function ignores labels and blank cells in the average. So,
for example, if the range C3:C50 includes scores for students on a test, but cells C6 and
C32 are blank because these students haven’t yet taken the test, then =AVERAGE
(C3:C50) averages only the scores for the students who took the test. (It doesn’t
automatically average in zeroes for the two who didn’t take the test.)
8.4
To use MAX and MIN functions
Enter the formula =MAX (range) or =MIN (range) where range is any range. These
produce the obvious results: the maximum (or minimum) value in a range of cells.
8.5
Using IF functions
IF functions are very useful, and they vary from simple to very complex. We’ll provide a
few examples.
Enter the formula =IF(condition,expression1,expression2), where condition is any
condition that is either true or false, expression1 is the value of the formula if the
condition is true, and expression2 is the value of the formula if the condition is false.
A simple example is =IF(A1<5,10,”NA”). Note that if either of the expressions is a label
(as opposed to a numerical value), it should be enclosed in double quotes.
Try it! Enter appropriate IF formulas in columns C and D. (Scroll to the right to see the
correct answer.) To start in cell C6 enter =IF(B6<50,”YES”,”NO”). Copy this formula
into cells C7:C10. In cell D6 enter =IF(C6="YES",200-B6,"N/A") and copy this formula
into cells D6:D10.
A
B
C
D
E
1 For each product, if the end inventory is less than or equal to 50 units,
2 enough units are ordered to bring stock back up to 200; otherwise, no
3 units of that product are ordered
4
5
Product End inventory Order placed (yes or no)? # of units ordered
6
1
100
7
2
40
8
3
20
9
4
70
10
Sometimes IF functions are nested. For example, there might be three possibilities,
depending on whether the value in cell A1 is negative, zero, or positive. A nested IF
formula could then be used as follows.
8.6
Using nested IF functions
13
Enter the formula =IF(condition1,expression1,IF(condition2,expression2,expression3)).
If condition1 is true, the relevant value is expression1. Otherwise, we check condition2.
If it is true, the relevant value is expression2. Otherwise, the relevant value is
expression3.
An example is =IF(A1<0,10,IF(A1=0,20,30)). Suppose this formula is entered in cell
B2. Then if A1 contains a negative number, B2 contains 10. Otherwise, if A1 contains
0, B2 contains 20. Otherwise (meaning that A1 must contain a positive value), B2
contains 30.
8.7
Using an AND condition in an IF function
Sometimes more complex conditions (AND or OR conditions) are useful in IF functions.
These are not difficult once you know the syntax.
Enter the formula =IF(AND(condition1,condition2),expression1,expression2). This
results in expression1 if both condition1 and condition2 are true. Otherwise, it results in
expression2.
Note the syntax. The keyword AND is followed by the conditions, separated by a
comma and enclosed within parentheses (of course, more than two conditions could be
included in the AND). AND itself is a condition, requiring that two conditions are met.
Try it! In cell C7, enter the formula
=IF(AND(B7=”UP”,B6=”UP”,B5=”UP”),”YES”,”NO”)
A
B
C
D
E
1 Investor sells stock only if its price has gone up three consecutive days
2 (including the current day)
3
4
Day Price change Sell (yes or no)?
5
1
Up
6
2
Down
7
3
Up
8
4
Up
9
5
Up
10
6
Down
8.8
To use an OR condition in an IF function
Enter the formula =IF(OR(condition1,condition2),expression1,expression2). This results
in expression1 if either condition1 or condition2 is true (or if they’re both true).
Otherwise, it results in expression2.
OR itself is a condition, requiring that at least one of the conditions is met. Again, more
than two conditions could be included in the OR.
AND and OR are logical functions.
8.9
Using lookup functions
14
Lookup tables are useful when you want to compare a particular value to a set of values,
and depending on where your value falls, assign a given “answer.” For example, you
might have a tax table that shows, for any gross adjusted income, what the corresponding
tax is. There are two versions of lookup tables, vertical (VLOOKUP) and horizontal
(HLOOKUP). Since they are virtually identical except that vertical goes down whereas
horizontal goes across, we’ll only discuss the VLOOKUP (value, table range, column
number) function.
The VLOOKUP function takes three arguments: (1) the value to be compared, (2) a table
of lookup values, with the values to be compared against always in the leftmost column,
and (3) the column number of the lookup table where you find the “answer.” Since the
VLOOKUP function is often copied down a column, it is usually necessary to make the
second argument an absolute reference, and this is accomplished most easily by giving
the lookup table a range name such as LookupTable. (Range names are always treated as
absolute references.)
The only requirement of a lookup table is that the values in the first column (the
comparison column) must be sorted in ascending order. Let’s say you want to assign
letter grades to students based on a straight scale: below 60, an F: at least 60 but below
70, a D; at least 70 but below 80, a C; at least 80 but below 90, a B; and 90 or above, an
A. The spreadsheet sample below shows how you would set this up. The comparison
column in the lookup table starts at 0 (the lowest grade possible), then records the cutoff
scores 60 through 90. The lookup table in the range E2:F6 is range-named LookupTable.
The typical formula in cell C2 (which is copied down column C) is
=VLOOKUP(B2,LookupTable,2). This compares the value in B2 (67) to the values in
column E and chooses the largest value less than or equal to it. This is 60. Then since
the last argument in the VLOOKUP function is 2, the score reported in C2 comes from
the second column of the lookup table next to 60, namely, D.
Student
1
2
3
4
5
6
7
8
9
Score
67
72
77
70
66
81
93
59
90
Grade
D
C
C
C
D
B
A
F
A
Lookup table
0
60
70
80
90
F
D
C
B
A
Create a lookup table with at least two columns, where the values in the first column are
in ascending order, and (for best results) give the table range a range name. Then enter
the formula =VLOOKUP(value,lookup table,column #), as described above.
Try it! Assume there is a quantity discount policy in force: for orders less than 300 units,
the unit price is $3; for orders of at least 300 units but less than 400, the unit price is
$2.50; for orders of 400 units or more, the unit price is $2. (Scroll to the right to see the
correct answer.)
15
Enter the following lookup table in cells D2:E4.
0
300
400
$3
$2.50
$2
Then enter the formula =B2*VLOOKUP(B2,$D$2:$E$4,2) in cells C2:C9. (DO NOT
FORGET TO USE ABSOLUTE REFERENCING TO REFERENCE THE LOOKUP
TABLE IF A RANGE IS ENTERED INSTEAD OF USING A RANGE NAME.)
A
B
C
D
1 Order # Units sold Total cost
2
1
373
3
2
475
4
3
459
5
4
441
6
5
238
7
6
349
8
7
344
9
8
203
E
0
300
400
F
$3.00
$2.50
$2.00
9 Using the paste function (fx) Button in the Top Toolbar
If you haven’t used this button, you should give it a try. It not only lists all of the
functions available in Excel (by category), but it also leads you through the use of them.
As an example, suppose you know there is an Excel function that does net present value,
but you’re not sure what its name is or how to use it. You could proceed as follows.
Select a blank cell where you want the function to go. Press the home > fx (insert
function) button and click on the category that seems most appropriate (Financial in this
case). Scan through the list for a likely candidate and select it (try NPV). At this point
you can get help, or you can press the Next button and enter the appropriate arguments
for the function (discount rate and one or more ranges of values).
Go through the different function to locate some of the functions that we discussed above
(such as SUM, IF, AVERAGE, VLOOKUP). You will see that the functions will step
you through all of the arguments that we discussed above for each function.
10 Using Data Tables
Data tables, also called what-if tables, allow you to see very quickly how one or more
outputs change as one or two key inputs change. There are two types of data tables: oneway tables and two-way tables. A one-way table has one input and any number of
outputs. A two-way table has two inputs but only one output. We’ll demonstrate both
types.
16
To illustrate, suppose Mr. Jones buys a new car for $20,000, makes a $5,000 down
payment, and finances the remaining amount over the next 36 months at an 8.5% annual
interest rate. There are at least two outputs that might be of interest: the monthly
payment and the total interest paid. These are affected by at least two inputs: the amount
of the down payment and the annual interest rate.
Let’s first look at a simple one-way data table, where we see how a single output,
monthly payment, varies as the annual interest rate varies. This is shown in the following
spreadsheet.
Price of car
Down payment
Amount financed
Annual interest rate
Number of payments
Monthly payment
Total interest paid
$20,000
$5,000
$15,000
8.50%
36
$473.51
$2,046.47
Data table
Interest rate Monthly payment
$473.51
8.00%
$470.05
8.25%
$471.78
8.50%
$473.51
8.75%
$475.25
9.00%
$477.00
To create the above table (which we already did):
Enter the formula for the output in cell E3. (Since the monthly payment was calculated
with the PMT function in cell B7, simply enter =B7 in cell E3.) Starting in cell D4, enter
any sequence of interest rates. Select the entire table, that is, the range D3:E8. Finally,
use the Data/Table menu item and enter B4 as the column input cell. (There is no row
input cell, so leave it blank.)
What happens when you do this? Excel takes each interest rate in column D, substitutes
it into the column input cell you designated (cell B4), recalculates the formula in cell E3
(the one we colored gray for emphasis) with this new interest rate, and records the answer
in the data table. We use a column input cell because the possible inputs (interest rates)
are listed in a column.
We can also capture more than one output in a one-way data table. An example appears
below, where the single input is still the interest rate, but there are two outputs: monthly
payment and total interest paid. This table is formed exactly as before except that the
table range is now D3:F8.
Price of car
Down payment
Amount financed
Annual interest rate
Number of payments
Monthly payment
Total interest paid
$20,000
$5,000
$15,000
8.50%
36
$473.51
$2,046.47
Data table
Interest Monthly payment
$473.51
8.00%
$470.05
8.25%
$471.78
8.50%
$473.51
8.75%
$475.25
9.00%
$477.00
Total interest
$2,046.47
$1,921.64
$1,983.98
$2,046.47
$2,109.09
$2,171.86
17
Try it! Create a one-way data table that shows the monthly payments and the total
interest paid for each term (value in cell B5) from 12 to 48 in increments of 12. (Scroll to
the right for the correct answer.)
Price of car
Down payment
Amount financed
Annual interest rate
Number of payments
Monthly payment
Total interest paid
$20,000
$5,000
$15,000
8.50%
36
$473.51
$2,046.47
Two-way tables allow you to vary two inputs, one along a row and one along a column,
and capture a single output in the body of the table. The following spreadsheet illustrates
this, where we vary the annual interest rate and the amount of the down payment. The
single output is the monthly payment.
Price of car
Down payment
Amount financed
Annual interest rate
Number of payments
Monthly payment
Total interest paid
$20,000
$5,000
$15,000
8.50%
36
$473.51
$2,046.47
Data table of monthly payment
$473.51
$4,000
$5,000
8.00% $501.38 $470.05
8.25% $503.23 $471.78
8.50% $505.08 $473.51
8.75% $506.94 $475.25
9.00% $508.80 $477.00
$6,000
$438.71
$440.33
$441.95
$443.57
$445.20
To create the above table (which we already did):
Enter the formula (=B7) for the single output in the upper left corner (cell D2) of the data
table. (Again, we colored this cell gray for emphasis.) Enter any sequence of down
payments to the right of this and any sequence of interest rates below this. Finally, select
the entire data table range, D2:G7, use the Data/Table menu item, enter B2 as the row
input cell, and enter B4 as the column input cell.
Note that B2 is the row input cell because various down payments are entered in a row
(E2:G2). Similarly, B4 is the column input cell because interest rates are entered in a
column. Excel substitutes each down payment into cell B2, each interest rate into cell
B4, calculates the formula in cell D2, and records the answer (monthly payment) in the
body of the table.
Try it! Create a two-way data table that shows the total interest paid for each term from
12 to 48 in increments of 12, and each down payment from $3000 to $5000 in increments
of $1000. Put down payments along the side, terms along the top. (Scroll to the right for
the correct answer.)
18
Price of car
Down payment
Amount financed
Annual interest rate
Number of payments
Monthly payment
Total interest paid
$20,000
$5,000
$15,000
8.50%
36
$473.51
$2,046.47
11. Split Screen
This is used to create two copies of the same document so that you can work on bioth
documents at the same time. Go to row that you want to have split, Ribbon > view >
window group > split
12. Insert Chart:
Type the data that you want to include in your chart and then Ribbon > insert > in charts
group select the type of chart you want. When you click on chart you will see additional
toolbars for charts that will give you three additional menus on tool bar: layout, design
and format that can be used for formatting the chart.
Selecting Chart Data: Chart data, called the data source, is stored in a range of cells in the
worksheet. When you select the data source, include the text you want to use as labels.
You can chart more than one series of data. A data series is a group of related information
in a column or row of a worksheet that is plotted on the chart.
Selecting a Chart Type: The next step is to select the type of chart you want to create,
such as a column chart, a pie chart, or a line chart. Each type of chart has a variety of
subtypes you can choose from. The chart types are available on the Insert tab in the
Charts group. Choosing the Chart Location: After you select a chart type and style, the
chart is inserted as an embedded chart in the center of the worksheet. You can also
choose to move the chart to a chart sheet, which is a separate sheet in the workbook that
stores a chart. If you need to change the data in the worksheet, the chart is automatically
updated to reflect the new data.
You switch between a chart sheet and a worksheet by clicking the appropriate sheet tab.
19
Download