You are on page 1of 42

Excel Tutorial to Improve Your Efficiency (2007 Version)

Introduction
My purpose with this Excel tutorial is to illustrate some Excel tips that will dramatically improve your efficiency. I make no attempt to be as encyclopedic as some of the 800-page Excel manuals available. I concentrate on common tasks not every last thing that can be done in Excel. !lso I presume that you have some Excel knowledge. "or example I assume you know about rows and columns values labels and formulas relative and absolute addresses and other basic Excel elements. If you know virtually nothing about Excel you probably ought to work through an #Excel for $ummies% book and then work through this tutorial. &he style of this tutorial should be easy to follow. Main topics appear in bold black type. 'pecific direction headings are in yellow and these are followed by detailed directions in red. !dditional comments about the directions appear in blue. &hen there are #&ry it(% exercises in green. &hese #&ry it(% exercises are a key feature of this tutorial. I have embedded numerous sample Excel spreadsheets so that you can try out the directions right away)without switching into Excel. *hen you double-click on one of these spreadsheets you launch Excel and the spreadsheet #comes alive.% &he menus and toolbars even change to those for Excel. +y clicking outside one of these spreadsheets you,re back in *ord. &he easiest way to maneuver around this tutorial is to switch to outline view. &o do so select *ord,s -iew.utline menu item which gives you an extra .utlining menu. 'elect this menu and then click on the 'how /evel dropdown. &his lets you choose the level of the outline. 0ou,ll get good results by choosing /evel 1. &his lets you see all first-level and second-level headings. 2ut your cursor on a heading of interest and then switch back to normal view by selecting *ord,s -iew2rint /ayout menu item. 3&ry it right now. It,s easy(4 "inally I suggest that you save this file56I78& 9.*5as My !Tutorial"docx 3or some such name4 and work with the copy. &hat way if you mess anything up as you try the exercises you can always go back and retrieve the original file 3 ExcelTutorial"docx4. 8ave fun(

#ifferences in Excel 2007


If Excel 100: is your first exposure to Excel you,ll love it. If you,re used to Excel 100; or an earlier version however you,ll have some unlearning to do. &here are two big changes in Excel 100: and a host of smaller changes. &he first big change is that worksheets are much bigger. 0ou used to have about <= 000 rows and 1=< columns. 9ow you have over a million rows and over >< 000 columns. 0ou,ll hardly ever use this much space but it,s available. &he second big change is the one you,ll notice right away? you no longer have the usual menus and toolbars. Microsoft has completely reorgani@ed the user interface to provide menus and ribbons. Each menu 38ome Insert 2age /ayout etc.4 has an associated ribbon that is similar to the old toolbars. "or example if you click on the "ormula menu you get a ribbon with buttons that are useful for working with formulas. Each ribbon has several groups of buttons. "or example the "ormulas ribbon has one group called $efined 9ames with buttons for manipulating range names. &here,s only one way to learn these ribbons? practice and experiment. If you,re used to the old Excel you,ll undoubtedly curse at the new ones a few times when you can,t find something but you can be assured that they are more logically organi@ed than the old versions. .ne particular menu item you,ll miss is &ools.ptions for changing various options in Excel. It,s not goneA it,s Bust in a different place. &o get to it click on the new .ffice button 3in the upper left corner of the screen4 and then the Excel .ptions button. "rom there you can Chris !lbright 2age > >D>ED10>E

experiment with the various options. *hile you,re at it note the options along the left when you click on the .ffice button. "or example that,s where you find 'ave !s and 2rint two obvious favorites. 0ou can,t change the new ribbonsA they are built in and fixed. 8owever you can customi@e the user interface to some extent. "irst Excel gives you a Fuick access toolbar 3G!&4 at the top left of the screen. 0ou can put your favorite buttons on this toolbar so that they,re always visible and available. &he G!& comes with a few favorite buttons but you can add more. Hust click on the dropdown arrow to the right of the G!& and check any of your favorites 3or click on More Commands to get more buttons4. 'econd if you don,t mind writing a bit of IM/ you can create new ribbons that have your favorite Excel buttons or even new buttons attached to your own macros. 3&his is somewhat advanced so it won,t be covered in this document.4 *ith the old menus gone what about the keyboard shortcuts many of you depend onJ !s far as I can tell they still work or at least most of them still work. "or example you can still press Ctrl-s to save a file or Ctrl-p to print a file. 8owever in this document where I,ve embedded spreadsheets the keyboard shortcuts for Excel won,t work. &his is evidently because the spreadsheets are embedded in a Word document. .ne other important change is file extensions. Knless you wrote your own add-ins in earlier versions of Excel the only file extension you probably ever saw was .xls. 0ou can still save files with this extension but they,ll lose any features new to Excel 100:. &o save them and keep new features you should save them as .xlsx files. 9ote that if you do so people with Excel 100; won,t be able to open them unless they download and install a free file format converter from Microsoft. 37oogle for Microsoft .ffice Compatibility 2ack to find this free download.4 .ne other new file extension is .xlsm. If your Excel file has associated -+! macros then you should save it as an .xlsm file.

$asic %preads&eet Tas's


&his section illustrates a number of ways to make you more efficient? how to select ranges how to copy and paste how to deal with absolute and relative addresses how to insert and delete rows or columns and a few others. Most Excel users know how to do these things but they often do them inefficiently. 'o even though this material might seem elementary read on)you might Bust pick up a few tricks you weren,t aware of.

Moving to t&e Top of t&e %&eet


.ften you want to reorient yourself by going back to the #home% position on the worksheet. &o go to the top left of the sheet 3cell !>4? 2ress Ctrl-8ome 3both keys at once4. Try it(
Great - you're back in a familiar location

Chris !lbright 2age 1 >D>ED10>E

)sing End*+rro, -ey .om/inations


&o go to the end of a range 3top bottom left or right4? 2ress the End key then the appropriate arrow key. "or example press End and then right arrow to go to the right edge of a range. Try it( %tarting at a corner (a /ordered cell)0 move around to t&e ot&er corners"

8 5 10 10 5 7 2

1 5 5 10 4 4 8

1 7 3 5 3 5 9

1 6 10 9 4 1 10

&he action of an End-arrow combination depends on where you start. It takes you to the last nonblank cell if you start in a nonblank cell. 3If there aren,t any nonblank cells in that direction it takes you to the far edge of the sheet.4 If you start in a blank cell it takes you to the first nonblank cell.

%plitting t&e %creen


It is often useful to split the screen so that you can see more information. &o split the screen vertically hori@ontally or both? Click on the narrow #screen splitter% bar Bust to the right of the bottom scroll bar 3for vertical splitting4 or Bust above the right-hand scroll bar 3for hori@ontal splitting4 and drag this to the left or down. 'plitting gives you two #panes% 3or four if you split in both directions4. .nce you have these panes practice scrolling around in any of them and see how the others react. Try it( %plit t&e screen eit&er ,ay and t&en remove t&e split"
77 9 30 45 34 80 33 64 74 38 31 35 23 45 13 55 52 4 37 3 11 26 55 99 93 12 73 38 98 10 98 33 Screen s litter bars 43 52 64 17 31 53 5 87

%electing a 1ange
Ksually in Excel you select a range and then do something to it 3such as enter a formula in it format it delete its contents and so on4. &herefore it is extremely important to be able to select a range efficiently. It,s easy if the whole range appears on the screen but it,s a bit trickier if you

Chris !lbright 2age ; >D>ED10>E

can,t see the whole range. In the latter case the effect of dragging 3the method most users try4 can be frustrating5things scroll by too Fuickly. &ry one of the methods below instead. &o select a range that fits on a screen? Click on one corner of the range and drag to the opposite corner. .r? Click on one corner hold down the 'hift key and click on the opposite corner. Try it( %elect t&e range $22#7"
9 1 8 7 5 5 2 3 1 5 1 10 10 8 10 4 1 7

&o select a range doesn,t fit on a screen? Click on one corner of the range say the upper left corner. &hen holding the 'hift key down use the End-arrow combinations 3End and right arrow then if necessary End and down arrow4 to get to the opposite corner. .r? 'plit the screen so that one corner shows in one pane and the opposite corner shows in the other pane. Click on one corner hold the 'hift key down and click on the opposite corner. Try it( %elect t&e range $22.300 or t&e range E2245" Try /ot& of t&e met&ods suggested a/ove"
6 7 1 6 4 2 2 2 8 3 2 3 4 4 7 4 2 6 7 5 1 9 13 6 2 13 9 11 9 1

%electing Multiple 1anges


'ay you want to format more than one range in a certain way 3as currency for example4. &he Fuickest way is to select all ranges at once and then format them all at once. &o select more than one range? 'elect the first range press the Ctrl key select the second range press the Ctrl key select the third range and so on.

Chris !lbright 2age E >D>ED10>E

"or example to select the ranges +1?$= and "1?8= click on +1 hold down the 'hift key and click on $= 3so now the first range is selected4 hold down the Ctrl key and click on "1 and finally hold down the 'hift key and click on 8=. Try it( %elect all t&ree numerical ranges s&o,n"
10 1 5 13 9 4 7 12 1 6 15 9 7 1 12 2

13

10

.opying and 6asting


Copying and pasting 3often formulas4 is one of the most freFuently done tasks in Excel and it can be a real time-waster if done inefficiently. Many people do it as follows. &hey select the range to be copied 3often in an inefficient manner4 then select the Edit Copy menu item then select the paste range 3again often inefficiently4 and finally select the Edit 2aste menu item. &here are much Fuicker ways to get the Bob done( &o copy and paste using keyboard shortcuts? 'elect the copy range 3using one of the efficient selection methods described above4 press .trl*c 3for copy4 select the paste range 3again efficiently4 and press .trl*v 3for paste4. 3If you practice pressing Ctrl-c or Ctrl-v with the little finger and index finger of your left hand it will become automatic in a short time.4 &he copy range will still have a dotted line around it. 2ress the Esc key to get rid of it. Try it( .opy t&e formula in cell .2 do,n t&roug& cell .7 using .trl*c and .trl*v"
3 4 2 2 5 4 3 3 1 3 1 1 2 5 9

&o copy and paste using toolbar buttons? 2roceed as above but use the copy and paste buttons 3in the left section of the 8ome ribbon4 instead of the Ctrl-c and Ctrl-v key combinations. Try it( .opy t&e formula in .2 do,n t&roug& cell .7 using t&e .opy and 6aste /uttons"

Chris !lbright 2age = >D>ED10>E

1 4 5 1 3 3 1

3 1 5 4 3 5 5

+uttons or key combinationsJ &his is a matter of personal taste but either is Fuicker than menu choices( ! freFuent task is to enter a formula in one cell and copy it down a row or across a column. &here are several very efficient ways to do this. &o avoid copying and pasting altogether use .trl*Enter? 'tarting with the top or left-hand cell select the range where the results will go. 3Kse the selection methods described earlier especially if this range is a long one.4 &ype in the formula and press .trl*Enter instead of Enter. Try it( 8ill up t&e range .22.7 ,it& .trl*Enter"
6 9 4 7 2 8 3 2 1 9 6 3 5 9

!ormula s"oul# multi ly t"e $alue in column % by t"e corres on#in& $alue in column '

2ressing Ctrl-Enter enters what you typed in all of the selected cells 3adBusted for relative addresses4 so in general it can be a real time saver. "or example it can be used to enter the number >0 in a whole range of cells. Hust select the range type >0 and press Ctrl-Enter. Try it( 8ill up t&e range $22#7 ,it& t&e value 30 /y using .trl*Enter"

&o copy with the drag handle?

Chris !lbright 2age < >D>ED10>E

Enter the formula in the top or left-hand cell of the intended range. 2lace the cursor on the #drag handle% at the lower right of this cell 3the cursor becomes a plus sign4 and drag this handle down or across to copy. Try it( .opy t&e formula in .2 do,n t&roug& .7 ,it& t&e 9drag &andle:"
10 6 4 5 2 8 10 7 9 9 1 8 10 7 70

&o copy by double-clicking on the drag handle? Enter the formula in the top or left-hand cell of the intended range. $ouble-click on the drag handle. &his method uses Excel,s built-in intelligence but it works only in certain situations. /et,s say you have numbers in the range !;?+>00. 0ou want to enter a formula in cell C; and copy it down to cell C>00. +ecause this is a common thing to do Excel does it for you if you doubleclick on the drag handle. It senses the #filled-up% range in column + and guesses that you want another filled-up range right next to it in column C. If there were no adBacent filled-up range double-clicking on the drag handle wouldn,t work. Try it( .opy t&e formula in .2 do,n t&roug& .7 /y dou/le*clic'ing t&e 9drag &andle":
7 2 10 4 4 3 7 8 1 2 1 5 8 8 56

.opying and 6asting ,it& t&e %pecial;Values <ption


.ften you have a range of cells that contains formulas and you would like to replace the formulas with the values they produce. Ksually you paste these values onto the copy range that is you overwrite the formulas with values. 8owever you could also select another range for the paste range. &o copy formulas and paste values? 'elect the range with formulas press Ctrl-c to copy and select the range where you want to paste the values 3which could be the same as the copy range4. &hen 3because there is no keyboard eFuivalent4 select the 2aste dropdown on the 8ome ribbon and select the 2aste -alues option. Try it( .opy t&e range #22#7 to itself0 /ut paste values"

Chris !lbright 2age : >D>ED10>E

1 2 9 7 8 8 7

1 3 5 4 8 10 6

1 6 45 28 64 80 42

0ou might want to experiment with the other options in the 2aste dropdown. "or 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 with the &ranspose option.

Moving (.utting and 6asting)


.ften you would like to move information from one place in the sheet to another. &o move 3cut and paste4? 'elect the range to be cut press .trl*x 3for cutting4 select the upper left corner of the paste range and press Ctrl-v. 3&he little finger-index finger combination in your left hand is also good for pressing Ctrl-x.4 !s with copying and pasting ribbon buttons can be used instead of key combinations but either is more efficient than selecting menu items. !lso note that you need only select the upper left cell of the paste range. Excel knows that the shape of the paste range must be the same as the shape of the cut range. Try it( Move t&e range +22.7 to t&e range #2287" (=atc& &o, relative addresses affect t&e eventual formulas in column 8")
2 7 3 3 6 6 1 3 4 6 9 7 6 4 6 28 18 27 42 36 4

+/solute;1elative 1eferences
!bsolute and references are indicated in formulas by dollar signs or the lack of them and they indicate what happens when you copy or move a formula to a range. 0ou typically want some parts of the formula to stay fixed 3absolute4 and others to change relative to the cell position. &his is a crucial concept for efficiency in spreadsheet operations so you should take some time to understand it thoroughly. 8ere are two important things to remember? 3>4 &he dollar signs are relevant only for the purpose of copying or movingA they have no inherent effect on the formula. "or example the formulas L=M+; and L=MN+N; in cell C; say produce exactly the same result. &heir difference is relevant only if you want to copy cell C; to some range. 314 &here is never any need to type the dollar signs. &his can be done with the "E key. &o make a cell reference absolute or mixed absoluteDrelative using the "E key? Chris !lbright 2age 8 >D>ED10>E

Enter a cell reference such as +; in a formula. &hen press the "E key. In fact pressing the "E key repeatedly cycles through the possibilities? +; 3neither row nor column fixed4 then N+N; 3both column + and row ; fixed4 then +N; 3only row ; fixed4 then N+; 3only column + fixed4 and back again to +;. Try it( Enter t&e appropriate formula in cell $7 and copy across to E7" (%croll to t&e rig&t to see t&e correct ans,er")
!i(e# cost *ariable cost +ont" -nits ro#uce# .otal cost )50 )2 ,an 224 !eb 194 +ar 228 % r 258

Try it again( Enter one formula ,it& appropriate a/solute;relative addressing in cell .5 t&at can /e copied to .528>" (%croll to t&e rig&t to see t&e correct ans,er")
.able of re$enues for $arious unit rices an# units sol# -nits sol# 50 -nit rice )3/25 )3/50 )3/75 )4/00 )4/25

100

150

200

%&o,ing 8ormulas in 13.3 4otation 'peaking of relative and absolute addresses in formulas it,s pretty ama@ing how intelligent spreadsheets are. *hen you copy a formula in cell C> such as L!>O+> down it automatically changes appropriately? L!1O+1 then L!;O+; etc. In a sense these are all the same formula. Each says to add the two values to the left of the current cell. Excel allows you to see this eFuivalence even more clearly by viewing the formulas in a different format called 6>C> notation. In this format each of the formulas in column C is written as L6CP-1QO6CP->Q. 6 stands for row and C stands for column. &he fact that there is nothing next to 6 means we stay in the same row. &he numbers in brackets next to C mean to go 1 columns to the left and > column to the left. 3"or columns negative numbers mean to go to the left positive to the right. "or rows negative numbers mean to go up positive down.4 If there is a number next to 6 or C that is not in brackets it indicates an absolute reference. "or example L61CP1Q placed in cell $= is eFuivalent to L"N1 since the row reference is absolute and the column reference is relative to column $. &he usual way of expressing formulas such as LC=O$= is called +3 format. &he new way discussed here is called 13.3 format. 0ou can easily toggle between them.
Chris !lbright 2age R >D>ED10>E

&o toggle between !> and 6>C> formats? 'elect the .ffice button select Excel options select "ormulas and check or uncheck the 6>C> reference style option. Try it( Toggle /et,een +3 and 13.3 reference style in t&e follo,ing spreads&eet0 and for eit&er0 examine t&e formulas inside t&e /order and in t&e Total ro," (4ote2 +s far as I can tell0 you?ll &ave to actually open Excel to try t&is one" =&en you dou/le*clic' on t&e spreads&eet /elo,0 t&e Excel menu appears0 /ut not t&e <ffice /utton" %o you evidently can?t c&ange t&e Excel options from ,it&in =ord" I suppose t&at ma'es sense")
+ulti lication table 1 2 3 4 .otal 1 1 2 3 4 10 2 2 4 6 8 20 3 3 6 9 12 30 4 4 8 12 16 40

I have read one Excel book that advocates the use of 6>C> notation everywhere reasoning that this notation makes more logical sense. Maybe the author has a point but the !> notation is so ingrained in most of us that the transition to 6>C> notation would probably start a revolt among millions of Excel users( Inserting and #eleting 1o,s or .olumns
.ften you want to insert or delete rows or columns. 9ote that deleting a row or column is not the same as clearing the contents of a row or column)making all of its cells blank. $eleting a row or column means wiping it out completely. &o insert one or more blank rows? Click on a row number and drag down as many rows as you want to insert. &hen click on the Insert dropdown and select Insert 'heet 6ows. 3Interestingly the Insert dropdown is in the Cells group of the 8ome ribbon not on the Insert ribbon.4 &he rows you insert are inserted above the first row you selected. "or example if you select rows 8 through >> and then insert four blank rows will be inserted between the old rows : and 8. Try it( Insert /lan' ro,s for t&e data for 8e/0 +pr0 and May"
+ont" ,an +ar ,un 0rice -nits sol# )3/00 100 )3/25 50 )3/50 200 1e$enue )300/00 )162/50 )700/00

Chris !lbright 2age >0>D>ED10>E

Columns are inserted in the same way. Try it( Insert /lan' columns for sales reps $a'er0 Miller0 and %mit& (so t&at t&e sales reps are in alp&a/etical order from left to rig&t)"
Sales re 2ommission rate Sales 2ommission %llison 5/43 )154000 )810 ,ones 6/53 )124000 )780 .aylor 4/33 )174000 )731

&o delete one or more rows? Click on a row number and drag down as many rows as you want to delete. &hen select the $elete dropdown and select $elete 'heet 6ows. Columns are deleted in exactly the same way. Try it( T&e company no longer carries products -@22 and 15A@0 so get rid of t&eir ro,s"
0ro#uct 2o#e ,645 5322 6254 +332 1543 S654 -nits sol# -nit rice 148 )15/00 278 )17/50 384 )25/00 13 )30/50 247 )22/40 315 )35/00

8illing a %eries
'ay you want to fill column ! starting in cell !1 with the values > 1 and so on up to >000. &here is an easy way. &o fill a column range with a series? Enter the first value in the first cell 3> in cell !14. *ith the cursor in the starting cell 3!14 select the "ill dropdown and then select the 'eries option to obtain a dialog box. 3&he "ill dropdown is in the Editing group of the 8ome ribbon.4 Change the 6ows setting to Columns make sure the &ype setting is /inear make sure > is in the 'tep -alue box enter the final value 3>0004 in the 'top -alue box and click on .S. !s you can guess from this dialog box many other options are possible. $on,t be afraid to experiment with them. Try it( T&e series of days in column + s&ould go from 3 to 250 in column # it s&ould go from 2B to 50"

Chris !lbright 2age >>>D>ED10>E

7ay

Sales )227 )157 )143 )129 )102 )116 )269 )111 )210

7ay

Sales )167 )107 )255 )113 )186 )124 )271 )288 )273

%ummation $utton
&he 'KM function is used so often to sum across rows or columns that a button 3the button4 is available to automate the procedure. &o illustrate its use suppose you have a table of numbers in the range +;?E:. 0ou want the row sums to appear in the range ";?": and you want the column sums to appear in the range +8?E8. It,s easy. &o produce row and column sums with the summation button? 'elect the range3s4 where you want the sums 3";?": and +8?E85remember how to select multiple rangesJ4 and click on the summation button. 9ote that if you select multiple cells you get the sums automatically. If you select a single cell 3such as when you have a single column of numbers to sum4 you,ll be shown the sum formula #for your approval% and you,ll have to press Enter to actually enter it. *hy does Excel do it this way5your guess is as good as mine( Try it( )se t&e summation /utton to fill in t&e ro, and column sums"

51 37 13 73 38

94 6 83 64 11

15 2 29 46 3

7 41 88 32 80

&he summation button is in the Editing group of the 8ome ribbon. If you want a sum click directly on the button. !lternately you can click on the !uto'um dropdown for other options including !verage Max Min and others.

Transposing a 1ange
.ften you set up a spreadsheet and then decide that you would rather have a portion of it transposed. &hat is you would like to #turn it on its side % so that rows become columns and vice versa. &his is simple with one of Excel,s 2aste options. &o transpose a range? 'elect a range that you want to transpose and press Ctrl-c to copy it. &hen select the upper left cell of the range where you want the transposed version to go select the 2aste dropdown and select the &ranspose option.

Chris !lbright 2age >1>D>ED10>E

Make sure there is enough room for the transposed version. "or example if the original range has ; rows and = columns the transposed version will have = rows and ; columns. If you select cell $= say as the upper left cell for the transposed version everything in the range $=?"R will be overwritten by the transposed version. Try it( Transpose t&e range +@2#B to a range ,it& upper left cell 8@"
Sales fi&ures ,an 2300 4300 5500 !eb 3200 3500 6500 +ar 4500 4200 6000

8ort" 9est :ast

1ange 4ames
6ange names are extremely useful for making your formulas more understandable. !fter all which formula makes more sense? C$20*$23 or C1evenue*.ostJ Efficient use of range names takes some experience but here are a few useful tips. &o create a range name? 'elect a range that you want to name. &hen type the desired range name in the upper left #name box% on the screen. 3&his box is Bust above the column ! heading. It usually shows the cell address such as E>; where the cursor is.4 0ou can also select the "ormulas menu and use the $efine 9ame option in the $efined 9ames group to name a range but typing the range name in the name box is Fuicker and more intuitive. +y the way range names are not case sensitive so that 6evenue revenue and 6E-E9KE can be used interchangeably. Try it( 4ame t&e rectangular range containing t&e num/ers #ata"
71 15 14 40 28 41 28 31 74 49 43 72 56 81 9 46 25 20 30 90 43 69 84 38 75 92 89 81 5 27 83 83 75 73 61

*hen you type the range name in the name box make sure you then press Enter to make the name #stick.% It,s easy to type the name and then click on some other cell without pressing Enter. 3I,ve done it hundreds of time.4 If you do so you,ll find that the range name was not created. &o delete a range name? 'elect the 9ame Manager in the $efined 9ames group of the "ormulas ribbon. &his shows a list of all range names in your workbook. Click on the one you want to delete and then click on the $elete button.

Chris !lbright 2age >;>D>ED10>E

'uppose a range has name Costs and you want to rename it KnitCosts. If you highlight the range the name box will show Costs. If you then overwrite this with KnitCosts in the name box the range will have two names Costs and KnitCosts. &here is nothing inherently wrong with this but if you want only a single name KnitCosts you will have to delete the Costs name as described here. Try it( T&e numerical range is currently named #ata" #elete t&is range name and t&en rename t&e range #ata/ase"
15 63 14 89 15 29 10 86 18 52 88 28 90 82 50 10 16 28 57 86 100 41 1 18 72 92 100 65 21 9 65 7 2 83 4

'uppose you have the labels 6evenue Cost and 2rofit in cells !10 !1> and !11 and you would like the cells +10 +1> and +11 3which will contain the values of revenue cost and profit4 to have these range names. 8ere,s how to do it Fuickly. &o create range names from adBacent labels? 'elect the range consisting of the labels and the cells to be named 3!10?+114. &hen click on the Create from 'election button in the $efined 9ames group of the "ormulas ribbon. In the resulting dialog box make sure the appropriate option 3in this case /eft Column4 is checked and click on .S. Excel tries 3usually successfully4 to guess where the labels are that you want to use as range names. If it guesses incorrectly you can always override its guess. Try it( 4ame t&e ranges +@2+70 $@2$70 and so on according to t&e la/els in ro, 2"
+ont" ,an !eb +ar % r +ay ,un -nitsSol# -nit0rice 100 )1/25 150 )1/25 200 )1/40 230 )1/40 200 )1/50 300 )1/50 1e$enue )125/00 )187/50 )280/00 )322/00 )300/00 )450/00

'ometimes you enter a formula using cell addresses such as C$20*$23. /ater you name +10 as 6evenue and +1> as Cost. &he formula does not change to C1evenue*.ost automatically. 8owever it would be nice to make it change 3and hence become more readable4. In Excel 100; and previous versions you could highlight the formula and use the Insert 9ame!pply menu item to change the formula so that it showed range names. 8owever this option appears to have been deleted in Excel 100:. 0ou can use the Kse in "ormula option from the $efined 9ames group but this is basically Bust a #crutch% to help you redefine your formula. Microsoft evidently had its reasons for deleting this functionality but I,m not what they were. &oo bad(

Chris !lbright 2age >E>D>ED10>E

&o see a list of all range names and check which ranges they apply to? Click on the down arrow at the right of the name box and click on any of the range names you see. &hat range will then be selected automatically. Try it( T&ere are five named ranges /elo," !ocate t&em"
73 92 31 60 49 22 39 88 98 110 4 29 38 2 45 12 6 ,unk ,unk 28 10 35 40 5 44 21 ,unk ,unk

'ometimes it is straightforward to use range names in formulas. "or example if +10 is named 6evenue and +1> is named Cost then entering the formula C1evenue*.ost in say cell +11 is a natural thing to do. +ut consider this situation. &he range +;?+>E contains revenues for each of >1 months and its range name is 6evenue. 'imilarly C;?C>E contains costs and its range name is Cost. "or each month you want that month,s revenue minus cost in the appropriate cell in column $. 0ou will get it correct if you select the range $;?$>E type the formula L6evenueCost and press Ctrl-Enter. If you click on any cell in this range you,ll see the formula C1evenue*.ost. &his is pretty ama@ing. 8ow does Excel know that the formula in $; for example is really C$@* .@J /et,s Bust say that it,s smart enough to figure this out. If it confuses you however you can always enter C$@*.@ and copy it down. &hen you,re safe but you,ve lost the advantage of range names( Try it( Enter t&e formula for all of #@2#3A using range names" (If you li'e0 calculate profits again in column E in t&e usual ,ay0 ,it&out range names")
1e$enue )14600 )24000 )24100 )24900 )500 )14700 )24000 )24500 2ost )14400 )14800 )14800 )24800 )400 )14500 )14900 )24300 0rofit

&o paste a list of all range names on a sheet? &o document your spreadsheet it is often useful to create a list of all of your range names and their corresponding cell addresses. &his is easy with 2aste 9ames option. &o paste a list of all range names and corresponding addresses select a cell with plenty of blank space below it select the Kse in "ormula dropdown in the $efined 9ames group and click on the 2aste 9ames option. Try it( 6aste a list of all range names0 starting in cell #2"

Chris !lbright 2age >=>D>ED10>E

1e$enue 2ost 0rofit

)344000 )224000 )124000

1an&e names use#;

$asic Excel 8unctions


&here are many useful functions in Excel. 0ou should become familiar with the ones most useful to you. "or example financial analysts should learn the financial functions. +ut here are a few that everyone should know. 3+y the way I capitali@e the names of these functions Bust for emphasis. 8owever they are not case sensitive. 0ou can enter 'KM or sum for example with the same result.4

%)M 8unction
&he 'KM function is probably the most used Excel function of all. It sums all values in one or more ranges. &o use the 'KM function? Enter the formula L'KM3range4 where range is any range. &his sums the numerical values in the range. !ctually it is possible to include more than one range in a 'KM formula as long as they are separated by commas. 3&his can also be done with the C.K9& C.K9&! !-E6!7E M!I and MI9 functions discussed below.4 "or example L'KM3+= C>0?$>1 6evenues4 is allowable 3where 6evenues is the name for some range4. &he result is the sum of the numerical values in all of these ranges combined. 9ote that if any cell in any of these ranges contains a label rather than a number it is ignored in the sum. Try it( )se t&e %)M function in cell $30 to calculate t&e total of all costs"
.able of costs for units ro#uce# in one mont" <alon& si#e= for use in anot"er mont" <alon& to = !eb )44300 +ar )34100 )54500 % r )34400 )64400 )64800 +ay )54900 )64500 )64400 )54900

,an !eb +ar % r .otal cost

.<)4T0 .<)4T+ 8unctions


&he C.K9& function counts all of the cells in a range with numeric values. &he C.K9&! functions counts all nonblank cells in a range. &o use the C.K9& function?

Chris !lbright 2age ><>D>ED10>E

Enter the formula LC.K9&3range4 where range is any range. &his returns the number of numeric values in the range. &o use the C.K9&! function? Enter the formula LC.K9&!3range4 where range is any range. &his returns the number of nonblank cells in the range. "or example if cells !> !1 and !; contain Month > and 1 respectively then LC.K9&3!>?!;4 returns 1 whereas LC.K9&!3!>?!;4 returns ;. Try it( )se t&e .<)4T and .<)4T+ functions to fill in cells E3 and E2" 4ote t&at t&ere are students /elo, t&e visi/le portion of t&e spreads&eet"
Stu#ent >7 :(am score 3416 62 6125 73 1535 74 2323 %bsent 577 77 9044 57 8403 67 5892 90 4242 77 8umber enrolle# 8umber ?"o took e(am

+VE1+DE 8unction
&he !-E6!7E function averages all of the numeric cells in a range. &o use the !-E6!7E function? Enter the formula L!-E6!7E3range4 where range is any range. &his produces the average of the numeric values in the range. 9ote that the !-E6!7E function ignores labels and blank cells in the average. 'o for example if the range C;?C=0 includes scores for students on a test but cells C< and C;1 are blank because these students haven,t yet taken the test then L!-E6!7E3C;?C=04 averages only the scores for the students who took the test. 3It does not automatically average in @eros for the two who didn,t take the test.4 Try it( )se t&e +VE1+DE function to calculate t&e averages in cells $3 and $2" (8or $20 you?ll &ave to replicate t&e exam scores in column . and ma'e some c&anges")
%$era&e e(am score <for stu#ents ?"o took t"e e(am= %$era&e e(am score <if absent stu#ents &et @eros= Stu#ent >7 :(am score 1533 68 8031 74 9859 80 9106 63 3535 72 8192 %bsent

Chris !lbright 2age >:>D>ED10>E

M+ 0 MI4 8unctions
&he M!I function returns the largest numeric value in a range. 'imilarly the MI9 function returns the smallest numeric value in a range. &o use M!I and MI9 functions? Enter the formula LM!I3range4 or LMI93range4 where range is any range. &hese produce the obvious results? the maximum 3or minimum4 value in the range. Try it( )se t&e M+ and MI4 functions to fill in t&e range $72.>" 8or example0 you ,ant t&e values E2@00 and E@B00 in cells $7 and .>"
Sales re ,an sales !eb sales %llison )34700 )24600 'aker )24400 )24200 ,ones )24300 )24400 +iller )34000 )24800 Smit" )34800 )34600 .aylor )34700 )24300

+in sales +a( sales ,an !eb

%)M61<#).T 8unction
&here are many times when you need to sum products of values in two 3or possibly more than two4 similar-si@ed ranges. "ortunately there is an Excel function that sums products Fuickly. &o use the 'KM26.$KC& function Enter the formula L'KM26.$KC&3range1 range24 where range1 and range2 are exactly the same si@e. "or example they might be two column ranges with >0 cells each or they might be two ranges with E rows and >0 columns each. &he formula sums the products of the corresponding values from the two ranges. &here can actually be more than two ranges in the 'KM26.$KC& formula separated by commas as long as all of them have exactly the same si@e. &his is not as common as having only two ranges but it is sometimes useful Try it( %um t&e products of t&e t,o ranges in t&e follo,ing spreads&eet to find t&e total s&ipping cost" Enter t&e result in cell D3" (%croll to t&e rig&t for t&e ans,er") $y t&e ,ay0 if you are tempted to ,rite t&e formula without t&e %)M61<#).T function as t&e sum of > products0 as many of my students continue to do0 imagine &o, long your formula ,ould /e if t&ere ,ere 30 plants and 50 cities(
-nit s"i 0lant1 0lant2 0lant3 -nits s"i 0lant1 0lant2 0lant3 in& costs 2ity1 1/25 1/15 1/35 2ity1 155 250 0 2ity2 1/35 1/45 1/45 2ity2 180 130 210 2ity3 1/55 1/25 1/15 2ity3 0 185 140 .otal cost

e#

Chris !lbright 2age >8>D>ED10>E

I8 8unction
I" functions are very useful and they vary from simple to complex. I,ll provide a few examples. &o enter a basic I" function? Enter the formula LI"3condition expression1 expression24 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. ! simple example is LI"3!>T= >0 #9!%4. 9ote that if either of the expressions is a label 3as opposed to a numeric value4 it should be enclosed in double Fuotes. Try it( Enter appropriate I8 formulas in columns . and #" (%croll to t&e rig&t to see t&e correct ans,er")
!or eac" ro#uct4 if t"e en# in$entory is less t"an or eAual to 50 units4 enou&" units are or#ere# to brin& stock back u to 200B ot"er?ise4 no units of t"at ro#uct are or#ere# 0ro#uct :n# in$entory Cr#er lace# <yes or no=D E of units or#ere# 1 100 2 40 3 20 4 70

'ometimes I" functions are nested. "or example there might be three possibilities depending on whether the value in cell !> is negative @ero or positive. ! nested I" formula can then be used as follows. &o use nested I" functions? Enter the formula LI"3condition1 expression1 I"3condition2 expression2 expression344. If condition1 is true the relevant value is expression1. .therwise condition2 is checked. If it is true the relevant value is expression2. .therwise the relevant value is expression3. !n example is LI"3!>T0 >0 I"3!>L0 10 ;044. 'uppose this formula is entered in cell +1. &hen if !> contains a negative number +1 contains >0. .therwise if !> contains 0 +1 contains 10. .therwise 3meaning that !> must contain a positive value4 +1 contains ;0. Try it( )se a nested I8 function to fill in t&e grades in column ." (%croll to t&e rig&t to see t&e correct ans,er")
:ac" stu#ent &ets an % <if score is 90 or abo$e=4 S for satisfactory <if score if 60 or abo$e but less t"an 90= or - for unsatisfactory if score is belo? 60 Stu#ent 1 2 3 4 5 6 Score 70 95 55 80 60 90 Gra#e

'ometimes more complex conditions 3!9$D.6 conditions4 are useful in I" functions. &hese are not difficult once you know the syntax.

Chris !lbright 2age >R>D>ED10>E

&o use an !9$ condition in an I" function? Enter the formula LI"3!9$3condition1 condition24 expression1 expression24. &his results in expression1 if both condition1 and condition2 are true. .therwise it results in expression2. 9ote the syntax. &he keyword !9$ is followed by the conditions separated by a comma and enclosed within parentheses. !lso note that more than two conditions could be included in the !9$ all separated by commas. Try it( )se an I8 function ,it& an +4# condition to fill in t&e /ordered range" (%croll to t&e rig&t to see t&e correct ans,er" 4ote t&e dou/le Fuotes for la/els")
>n$estor sells stock only if its rice "as &one u t"ree consecuti$e #ays <inclu#in& t"e current #ay= 7ay 0rice c"an&e Sell <yes or no=D 1 2 7o?n 3 4 5 6 7o?n

&o use an .6 condition in an I" function? Enter the formula LI"3.63condition1 condition24 expression1 expression24. &his results in expression1 if either condition1 or condition2 is true 3or if both are true4. .therwise it results in expression2. !gain more than two conditions could be included in the .6. Try it( )se an I8 function ,it& an <1 condition to fill in t&e /onuses in column 8" (%croll to t&e rig&t to see t&e correct ans,er")
%ny stu#ent ?"o scores at least 95 on any of t"e e(ams &ets a bonus ?"ic" is 13 of t"eir total score/ Stu#ent 1 2 3 4 5 6 :(am 1 87 77 80 82 78 75 :(am 2 83 72 95 87 94 83 :(am 3 83 74 79 96 81 80 :(am 4 80 97 75 88 79 72 'onus

V!<<-)60 G!<<-)6 8unctions


/ookup 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.% "or example you might have a tax table that shows for any gross adBusted income what the corresponding tax is. &here are two versions of lookup tables vertical 3-/..SK24 and hori@ontal 38/..SK24. 'ince they are virtually identical except that vertical goes down whereas hori@ontal goes across I,ll only discuss the -/..SK2 function. +esides -/..SK2 appears to be used much more freFuently than 8/..SK2. &he -/..SK2 function takes three arguments plus an optional fourth argument? 3>4 the value to be compared 314 a lookup table with the values to be compared against always in the leftmost Chris !lbright 2age 10>D>ED10>E

column and 3;4 the column number of the lookup table where you find the #answer%A and 3E4 &6KE or "!/'E 3which is &6KE by default if omitted4. +ecause the -/..SK2 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 /ookup&able. 36ange names are always treated as absolute references.4 &he most common use of a lookup table is when the values in the first column 3the comparison column4 are sorted in ascending order. 3&hen the fourth argument can be omitted.4 /et,s say you want to assign letter grades to students based on a straight scale? below <0 an "? at least <0 but below :0 a $A at least :0 but below 80 a CA at least 80 but below R0 a +A and R0 or above an !. &he spreadsheet sample below shows how you would set this up. &he comparison column in the lookup table starts at 0 3the lowest grade possible4 then records the cutoff scores <0 through R0. &he lookup table in the range E1?"< is range-named /ookup&able. &he formula in cell C1 is L-/..SK23+1 /ookup&able 14 and this is copied down column C. &his formula compares the value in +1 3<:4 to the values in column E and chooses the largest value less than or eFual to it. &his is <0. &hen because the last argument in the -/..SK2 function is 1 the score reported in C1 comes from the second column of the lookup table next to <0 namely $.
Stu#ent 1 2 3 4 5 6 7 8 9 Score 67 72 77 70 66 81 93 59 90 Gra#e 7 2 2 2 7 ' % ! % 6ooku table 0 60 70 80 90 ! 7 2 ' %

&o use a -/..SK2 function? Create a lookup table with at least two columns where the values in the first column are in ascending order and 3for best results4 give the table range a range name. &hen enter the formula L-/..SK23value lookup table column #4 as described above. Try it( Enter a loo'up ta/le in columns E and 80 and V!<<-)6 functions in column ." +ssume t&ere is a Fuantity discount pricing sc&eme2 for orders less t&an @00 units0 t&e unit price is E@H for orders of at least @00 units /ut less t&an A000 t&e unit price is E2"50H for orders of A00 units or more0 t&e unit price is E2" (%croll to t&e rig&t to see t&e correct ans,er")
Cr#er E -nits sol# .otal cost 1 373 2 475 3 459 4 441 5 238 6 349 7 344 8 203

Chris !lbright 2age 1>>D>ED10>E

&here are times where the first column of the lookup table are not sorted in ascending order. &his is still allowable but then you need to include the fourth argument with value "!/'E in the -/..SK2 function. In this case -/..SK2 will look for an exact match and will return an error if doesn,t find an exact match. Try it( )se a V!<<-)6 function in column . to find t&e gradepoints for eac& student" 4ote t&at t&e grades in column E of t&e loo'up ta/le are in t&e 9natural: order0 /ut t&ey are not in Excel?s +*I sort order" T&erefore0 8+!%E must /e entered as t&e fourt& argument in t&e V!<<-)6 function"
S tudent G rade Adams B Davis AE dwards C + Johnson BMyers B+ S mith A !homson C G radepoints G rade A AB+ B BC + C C G radepoints 4 3.7 3.3 3 .7 .3 ".7

6aste 8unction (fx) $utton


If you haven,t used this button located Bust to the left of the formula bar you should give it a try. I like to call it the function wizard. It not only lists all of the functions available in Excel 3by category4 but it also leads you through the use of them. !s an example suppose you know there is an Excel function that calculates payments on a loan but you,re not sure what its name is or how to use it. 0ou could proceed as follows. &o use the function wi@ard? 'elect a blank cell where you want the function to go. 2ress the fx button and click on the category that seems most appropriate 3"inancial in this case4. 'can through the list for a likely candidate and select it 3try 2M&4. !t this point you can get help or you can press the .S button and enter the appropriate arguments for the function 3interest rate term and principal the latter expressed as a negative number4. Try it( )se t&e function ,iJard to &elp you determine t&e function in cell $B" )se t&e range names in cells $@ t&roug& $5 for improved reada/ility" (%croll to t&e rig&t to see t&e correct formula")
0ayments for +r/ ,ones4 ?"o Fust bou&"t a ne? car %mount finance# %nnual interest rate .erm <number of mont"s finance#= +ont"ly ayment )154000 8/903 36

Chris !lbright 2age 11>D>ED10>E

#ata Ta/les
$ata tables also called what-if tables allow you to see very Fuickly how one or more outputs change as one or two key inputs change. &here are two types of data tables? one-way tables and two-way tables. ! one-way table has one input and any number of outputs. ! two-way table has two inputs but only one output. I,ll demonstrate both types. &o illustrate suppose Mr. Hones buys a new car for N10 000 makes a N= 000 down payment and finances the remaining amount over the next ;< months at an 8.=U annual interest rate. &here are at least two outputs that might be of interest? the monthly payment and the total interest paid through the duration of the loan. &hese are affected by at least two inputs? the amount of the down payment and the annual interest rate. /et,s first look at a simple one-way data table which illustrates how a single output monthly payment varies as the annual interest rate varies. &his is shown in the following spreadsheet.
0rice of car 7o?n ayment %mount finance# %nnual interest rate 8umber of ayments +ont"ly ayment .otal interest ai# )204000 )54000 )154000 8/503 36 )473/51 )24046/47 7ata table >nterest rate +ont"ly ayment )473/51 8/003 )470/05 8/253 )471/78 8/503 )473/51 8/753 )475/25 9/003 )477/00

&o create the above table 3which I already did4? Enter a link for the output in cell E;. +ecause the monthly payment was calculated with the 2M& function in cell +: simply enter C$7 in cell E;. &hen starting in cell $E enter any seFuence of interest rates. 'elect the entire table)the range $;?E8. 9ext select the $ata menu and in the $ata &ools group select $ata &able from the *hat-If !nalysis dropdown. "inally enter +E as the column input cell. &here is no row input cell so leave it blank. It is important to understand what happens when you do this so read this paragraph several times until it sinks in. Excel takes each interest rate in column $ substitutes it into the column input cell you designated 3cell +E4 recalculates the formula in cell E; 3the one I colored gray for emphasis4 with this new interest rate and records the answer in the data table. 0ou use a column input cell because the possible inputs 3interest rates4 are listed in a column. It is also possible to capture multiple outputs in a one-way data table. !n example appears below where the single input is still the interest rate but there are two outputs? monthly payment and total interest paid. &his table is formed exactly as before except that the table range is now $;?"8.
0rice of car 7o?n ayment %mount finance# %nnual interest rate 8umber of ayments +ont"ly ayment .otal interest ai# )204000 )54000 )154000 8/503 36 )473/51 )24046/47 7ata table >nterest +ont"ly ayment )473/51 8/003 )470/05 8/253 )471/78 8/503 )473/51 8/753 )475/25 9/003 )477/00 .otal interest )24046/47 )14921/64 )14983/98 )24046/47 )24109/09 )24171/86

Chris !lbright 2age 1;>D>ED10>E

Try it( .reate a one*,ay data ta/le t&at s&o,s t&e mont&ly payments and t&e total interest paid for eac& term (value in cell $5) from 32 to A7 in increments of 32" (%croll to t&e rig&t for t&e correct ans,er")
0rice of car 7o?n ayment %mount finance# %nnual interest rate 8umber of ayments +ont"ly ayment .otal interest ai# )204000 )54000 )154000 8/503 36 )473/51 )24046/47

&wo-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. &he following spreadsheet illustrates this where the annual interest rate and the amount of the down payment both vary and the single output is the monthly payment.
0rice of car 7o?n ayment %mount finance# %nnual interest rate 8umber of ayments +ont"ly ayment .otal interest ai# )204000 )54000 )154000 8/503 36 )473/51 )24046/47 7ata table of mont"ly ayment )473/51 )44000 )54000 8/003 )501/38 )470/05 8/253 )503/23 )471/78 8/503 )505/08 )473/51 8/753 )506/94 )475/25 9/003 )508/80 )477/00 )64000 )438/71 )440/33 )441/95 )443/57 )445/20

&o create the above table 3which I already did for you4? Enter the formula C$7 for the single output in the upper left corner cell $1 of the data table. 3!gain I colored this cell gray for emphasis.4 Enter any seFuence of down payments to the right of this and any seFuence of interest rates below this. 9ext select the $ata menu and in the $ata &ools group select $ata &able from the *hat-If !nalysis dropdown. "inally enter +1 as the row input cell and enter +E as the column input cell. 9ote that +1 is the row input cell because various down payments are entered in a row 3E1?714. 'imilarly +E is the column input cell because interest rates are entered in a column. Excel substitutes each down payment into cell +1 each interest rate into cell +E calculates the formula in cell $1 and records the answer 3monthly payment4 in the body of the table. Try it( .reate a t,o*,ay data ta/le t&at s&o,s t&e total interest paid for eac& term from 32 to A7 in increments of 320 and eac& do,n payment from E@000 to E5000 in increments of E3000" 6ut do,n payments along t&e side0 terms along t&e top" (%croll to t&e rig&t for t&e correct ans,er")

Chris !lbright 2age 1E>D>ED10>E

0rice of car 7o?n ayment %mount finance# %nnual interest rate 8umber of ayments +ont"ly ayment .otal interest ai#

)204000 )54000 )154000 8/503 36 )473/51 )24046/47

=or'ing ,it& Text


Most people use Excel functions to calculate numbers. 8owever Excel also provides several very useful functions for manipulating text. &hese can be real time savers. &his section illustrates some of the most common ways to manipulate text in Excel.

6arsing Text ,it& Text 8unctions


'uppose for example that someone has given you a spreadsheet such as the one below. Each cell in column ! has a person,s name? last name then a comma and a space and then first name. 0our Bob is to parse 3that is separate4 these names as indicated for the name in cells +> and C>. &hat is column + should have all of the first names and column C should have all of the last names. Knfortunately imagine that there are =000 names in column !. *hat do you doJ If you Bust start typing you,ll be at for a long time 3and you,ll undoubtedly make mistakes4.
,ones4 'ob 'ob 7a$is4 Ste "en ."om son4 %n#y 9ilson4 ,o"n !re#ericks4 5at"y 9illiams4 5aren Smit"4 .om ,ennin&s4 0eter 'enson4 .e# Samson4 ,ason ,ones

"ortunately there is a much better way. /ogically we observe that every name has a comma and a space. &he first name is what comes after the comma and space and the last name is what comes before it. "or the name Hones +ob there are >0 characters 3including the comma and space and the comma and space are characters < and :. 'o the first name is the rightmost ; characters and the last name is the leftmost = characters. In any parsing operation this is the first and probably the most crucial step? find a pattern.

8I4#0 !E40 1IDGT0 !E8T0 and MI# 8unctions


&o do the parsing we use Excel,s "I9$ /E9 6I78& /E"& and MI$ functions. 3!ctually we don,t need the MI$ function for this particular example but it is necessary for many similar examples.4 &o use the "I9$ function? &he "I9$ function has the syntax L"I9$3 subtext text n4 where text is the original text subtext is a piece of text to be found in text and n is an optional integer argument. &his function returns the position of the first occurrence of subtext if any. If there are no occurrences it returns an error. If

Chris !lbright 2age 1=>D>ED10>E

the argument n is missing it starts the search at character >A otherwise it starts the search at character n. 8ere are a few examples? &he formula L"I9$3# % #Hones +ob%4 returns < because the comma is the sixth character in Hones +ob. &he formula L"I9$3#nes% #Hones +ob%4 returns ; because the subtext #nes% begins in the third character of Hones +ob. &he formula L"I9$3#o% #Hones +ob%4 returns 1 because the first occurrence of the letter #o% occurs in the second character of Hones +ob. 8owever the formula L"I9$3#o% #Hones +ob% ;4 returns R because the first occurrence of #o% starting from character ; is character R. &he formula L"I9$3#t% #Hones +ob%4 returns an error because the letter #t% isn,t found in Hones +ob.

&o use the /E9 function? Enter the formula L/E93text4. &his returns the number of characters in text. &o use the 6I78& function? Enter the formula L6I78&3text n4 where n is an integer. &his returns the rightmost n characters in text. 3If n is greater than /E93text4 it return the entire text.4 &o use the /E"& function? Enter the formula L/E"&3text n4 where n is an integer. &his returns the leftmost n characters in text. 3If n is greater than /E93text4 it return the entire text.4 &o use the MI$ function? Enter the formula LMI$3text s n4 where s is an integer and n is an optional integer. If n is missing this returns all of text from character s on. 3s stands for start.4 .therwise it returns n characters of text starting with character s. 8ere are some examples? &he function LMI$3#"reddie% =4 returns #die%. &he function LMI$3#"reddie% = 14 returns #di%. &he function LMI$3#Hones +ob% "I9$3# % #Hones +ob%4O14 returns #+ob%. 3'ee whyJ4

+etween these five functions)"I9$ /E9 6I78& /E"& and MI$)you can do some powerful text manipulation in Excel and this can save hours of tedious typing. 0ou will be the hero at your office( *e now solve the above name-parsing problem in a series of steps as indicated below. In cell +> we use /E9 to get the length of the text in cell !>. In cell C> we use "I9$ to find the position of the comma. In cell $> we add > to find the position of the space after the comma. *e then find the first name with the 6I78& function using the rightmost 3>0-:4 characters. 'imilarly we find the last name with the /E"& function using the leftmost 3<->4 characters. &he beauty of this method is that we have to do it only once in row >. &hen we can copy all of the formulas down for the rest of the names even if there are =000 of them( 3&ry it below. Copy the formulas down.4

Chris !lbright 2age 1<>D>ED10>E

,ones4 'ob 7a$is4 Ste "en ."om son4 %n#y 9ilson4 ,o"n !re#ericks4 5at"y 9illiams4 5aren Smit"4 .om ,ennin&s4 0eter 'enson4 .e# Samson4 ,ason

10

7 'ob

,ones

Try it( T&is is a /it more difficult t&an t&e name*parsing exercise a/ove" 4o, eac& name is a first name0 t&en a middle initial and a period0 and t&en a last name" T&e goal is to &ave t&ree columns ,it& t&e first name0 t&e middle initial (no period)0 and t&e last name" (%croll to t&e rig&t for a possi/le solution" T&is solution finds eac& piece of t&e name in a single formula" You mig&t prefer to /rea' it up into several formulas")
'ob :/ ,ones Ste "en 2/ 7a$is %n#y ./ ."om son ,o"n !/ 9ilson 5at"y 2/ !re#ericks 5aren 7/ 9illiams .om ./ Smit" 0eter !/ ,ennin&s .e# 1/ 'enson ,ason :/ Samson

.oncatenating Text
&he opposite of parsing text is concatenating text. &o parse text we start with a long piece of text and separate it into pieces. &o concatenate we start with two or more pieces of text and #string them together.% "or example we might parse #+ob Hones% into #+ob% and #Hones%. In the other direction we might concatenate #+ob% and #Hones% into #+ob Hones%. &he key to concatenating in Excel is the ampersand symbol V. &o concatenate the text in cells !> and +> for example enter the formula L!>V+> in cell C>. /iteral text can also be included such as L!>V# %V+>. In this case if !> contains #Hones% and +> contains #+ob% then C> will contain #Hones +ob%. &his concatenates the last name a literal comma and space and the first name. Try it( .oncatenate t&e first names0 middle initials0 and last names in columns +0 $0 and . so t&at full names of t&e form Kones0 $o/ E" appear in column #"
'ob Ste "en %n#y ,o"n 5at"y 5aren .om 0eter .e# ,ason : 2 . ! 2 7 . ! 1 : ,ones 7a$is ."om son 9ilson !re#ericks 9illiams Smit" ,ennin&s 'enson Samson

Chris !lbright 2age 1:>D>ED10>E

=or'ing ,it& #ates


*e tend to take dates and times for granted but they appear in many if not most real-world business spreadsheets. &hey are actually Fuite complex to work with and a complete treatment of dates and times could fill a long chapter of a book. I can,t hope to cover all of the intricacies of Excel-based dates and times in this tutorial but I will illustrate some of the most useful methods for working with them.

Go, #ates +re %tored


&he first thing to reali@e is that a date-time value that appears in a cell as something like ;D>ED100E E?;0 2M is really stored as a number. Excel refers to this number as the serial value. &he serial value corresponding to this particular date-time happens to be ;80<0.<88. &he value to the left of the decimal is the number of days since a #base% date 3Hanuary > >R004 and the decimal part indicates the fraction of time through the day starting right after midnight. In this example E?;0 2M is <8.8U of the way from midnight to the next midnight. If the decimal part is omitted then it is assumed to be midnight. In this case you usually format the value so that only the date not the time appears. If you happen to know the numbering system for dates 3that is you somehow know that ;80<0 corresponds to ;D>ED100E4 you could enter the number ;80<0 in a cell and then format it to look like a date. Ksually however you enter a date like ;D>ED100E in a cell. In fact if you enter the date in one of several formats Excel recogni@es 3including ;D>ED100E March >E 100E ;->E-0E and a few others4 Excel will know that it is a date but underneath the hood it will store the value as ;80<0. &he same goes for date-times such as ;D>ED100E E?;0 2M or Bust times such as E?;0 2M. If you enter either of these in a format that Excel recogni@es as a date-time or Bust a time Excel will recogni@e that these as date-times or times but it will store them as numbers 3<80;0.<88 or 0.<884. +y the way if you enter a date-time in a format that Excel doesn,t recogni@e you,re entirely out of luck. It will simply be stored as a label with no inherent #date-time% meaning. !nd Excel can be fussy. "or example it doesn,t understand ;D>ED100E E?;02M simply because there is no space between E?;0 and 2M( 3I wish I were kidding but I,m not.4 .n the other hand Excel is smart about dates. It will recogni@e that RD;>D>RRR and 1D1RD100; are not dates)regardless of how they are formatted. Try it( T&e follo,ing spreads&eet includes some date*times0 dates (no times specified)0 and times (no dates specified)0 formatted in several allo,a/le ,ays" 8ormat t&ese as num/ers ,it& @ decimals to see t&e serial values" T&en reformat t&em as date*times (in formats you can c&oose)"
3G14G04 1;30 0+ 12G31G1901 3;50 12;00 0+ 29-!eb-96 9G24G46 14;45

Chris !lbright 2age 18>D>ED10>E

Go, Excel #eals ,it& t&e Y2- 6ro/lem


$o you remember the 01S problem that worried everyone in late >RRRJ &he problem was that a large number of dates in all kinds of systems listed 1-digit years such as 8= instead of >R8=. 8ow would systems know whether 0= means >R0= or 100=J "ortunately the predicted disaster didn,t happen but there is still a 01S problem because of the ambiguity it can create. Excel handles it 3at least for now4 by interpreting a 1-digit year less than ;0 as being in the 1> st century and all others as being in the 10th century. "or example it interprets ;D>ED>: as March >E 10>: and =D10D:1 as May 10 >R:1. .f course the easiest way to avoid the ambiguity is to use E-digit years whenever you enter dates. &his is the main lesson of 01S( Try it( In t&e spreads&eet a/ove0 enter a date suc& as @;3A;2> (t&e last t,o digits less t&an @0)" T&en enter anot&er date suc& as 5;20;@0 (t&e last t,o digits greater t&an or eFual to @0)" =atc& &o, Excel transforms t&e year automatically" #o you see &o, t&is could /e a pro/lem if you really meant @;3A;2> to /e t&e /irt&day of a person /orn in 3>2>L

4<=0 T<#+Y 8unctions


Excel has two useful functions for entering the current date or the current date and time automatically &.$!0 and 9.*. &o use the &.$!0 function? Enter the formula L&.$!034 in any blank cell. 3&he blank parentheses are necessary.4 It returns the current date. If you open this spreadsheet tomorrow it will list tomorrow,s date that is it will update each day. &o use the 9.* function? Enter the formula L9.*34 in any blank cell. 3!gain the blank parentheses are necessary.4 It returns the current date and time. Try it( Enter t&e T<#+Y and 4<= functions in column $ of t&e follo,ing spreads&eet" T&en format result of 4<= as time onlyMno date" +fter you?ve ,or'ed a fe, ot&er exercises /elo,0 come /ac' to t&is spreads&eet and see ,&et&er t&e time &as c&anged" (You mig&t &ave to force a recalculation to see t&e c&ange" You can do t&is easily /y pressing t&e 8> 'ey")
.o#ay's #ate 2urrent time

YE+10 M<4TG0 #+Y0 =EE-#+Y 8unctions


If a cell contains a date it is easy to strip off the year month day or even weekday with the 0E!6 M.9&8 $!0 and *EES$!0 functions. In all of the following examples datecell refers to a cell that contains a date. &o use the 0E!6 function? Enter the formula L0E!63datecell4. &his returns a E-digit year such as >RR;.

Chris !lbright 2age 1R>D>ED10>E

&o use the M.9&8 function? Enter the formula LM.9&83datecell4. &his returns a month from > 3Hanuary4 to >1 3$ecember4. &o use the $!0 function? Enter the formula L$!03datecell4. &his returns the day of the month from > to the number of days in the month. &o use the *EES$!0 function? Enter the formula L*EES$!03datecell4. &his returns a number from > to : where > refers to 'unday 1 to Monday and so on. If you want to get the name of the day such as &hursday use a -/..SK2 function as indicated in the exercise below. Try it( 8or eac& date in column +0 return t&e year0 mont&0 mont& name0 day0 ,ee'day0 and ,ee'day name in columns $ND" 8or t&e mont& and ,ee'day names0 use t&e loo'up ta/les given" (%croll to t&e rig&t to see t&em") #o you recogniJe t&ese 9infamous: datesL Try one more2 your o,n /irt&date"
7ate 9G11G2001 1G28G1986 11G22G1963 8G6G1945 12G7G1941 4G14G1912 Hear +ont" +ont" name 7ay 9eek#ay 9eek#ay name

#+TE#I8 8unction
+ecause dates are stored as numbers it is possible to perform arithmetic on them. .ne particular arithmetic operation makes sense? subtraction. If you subtract one date from another you find the number of days between them. 0ou can do this by simple subtraction of cells or you can get more control with the $!&E$I" function. If you use simple subtraction you automatically get the difference in days. "or example the formula L!>-!1 where !> contains >>D1=D100E and !1 contains >>D10D100E gives =. &he $!&E$I" function provides more options. 3Evidently $!&E$I" has been in Excel for years but its documentation in online help has been sporadic. 'ee the interesting article at http?DDwww.cpearson.comDexcelDdatedif.htm.4 &o use the $!&E$I" function? Enter the formula L$!&E$I"3earlierdate laterdate interval4 where interval can be #y% #m% #d% or a few other options not covered here. If interval is #y% 3Fuotes reFuired4 this returns the number of years between the two dates. 'imilarly if interval is #m% or #d% it returns the number of months or number of days between the two dates. Try it( )se simple su/traction of cells to find t&e num/er of days /et,een t&e follo,ing t,o dates" T&en use #+TE#I8 ,it& t&e t&ree options descri/ed a/ove to get t&e num/er of days0 mont&s0 and years /et,een t&e t,o dates" (4ote2 You?ll &ave to reformat t&e ans,er in cell $B as a num/er" Excel ,ants to format it as a date for some odd reason" %croll to t&e rig&t for t&e ans,ers")

Chris !lbright 2age ;0>D>ED10>E

7ates of last t?o "ysical e(ams !irst e(am 8e(t e(am 7ays <subtraction= 7ays <7%.:7>!= +ont"s <7%.:7>!= Hears <7%.:7>!= 4G5G1999 7G15G2003

#+TE0 #+TEV+!)E 8unctions


&he last two date functions I,ll mention are $!&E and $!&E-!/KE. &he $!&E function takes a date such as ;D>ED100E and return the serial value in this case <80;0. I see no obvious uses for this function. 3!fter all you can see the serial value if you want by formatting the date cell as a number. +esides you probably have little interest in the actual number anyway.4 I,ve mentioned it simply because you might see it in online help and think it,s important. &he $!&E-!/KE function on the other hand can be a real life-saver. It takes a date stored as text and returns the corresponding serial value which you could then format as a date. *hy is this importantJ 'uppose you have a lot of data stored in some type of legacy system in your business and you are somehow able to #dump% it into Excel. &he chances are that all dates will be imported as text. &hat is a cell value will look something like =D10D100> but Excel won,t recogni@e it as a date. *ithout the $!&E-!/KE function you would have retype all of the dates( 8owever $!&E-!/KE saves you this mind-numbing work. &o use the $!&E-!/KE function? Enter the formula L$!&E-!/KE3datetext4 where datetext refers to a date stored as text. &hen format the result as a date. Try it( .reate dates in column $ corresponding to t&e text values in column + t&at &appen to loo' li'e dates" (I typed an apostrop&e in front of eac& value in column +" T&at?s ,&y t&ey are interpreted as text0 not as dates")
7ates im orte# from a le&acy system 8o$ 254 1997 8o$ 264 1997 8o$ 294 1997 7ec 14 1997 7ec 34 1997

%tatistical 8unctions
&here are many statistical functions built into Excel. I,ve already discussed the simplest statistical function the !-E6!7E function. 3'tatisticians often call this the mean or the sample mean but it,s simply the average of a set of numbers.4 In this section I,ll discuss a few other statistical functions.

Chris !lbright 2age ;>>D>ED10>E

ME#I+40 M<#E 8unctions


&he median is the #middle% value in a set of numbers in the sense that half are above it and half are below it. More precisely when the values are sorted in increasing order it is the middle value if there are an odd number of values and it is the average of the two middle values if there are an even number of values. "ortunately Excel takes care of the details with the ME$I!9 function. &o use the ME$I!9 function? Enter the formula LME$I!93datarange4 where datarange is any range that contains a set of values. 9ote that if datarange contains labels or blank cells these are ignored when calculating the median. &his is true for the other statistical function listed below. 3.f course it is also true for the !-E6!7E function.4 Try it( 8ind t&e median of t&e num/ers in column + (,&ic& extend ,ell /elo, ro, 30)" Is it t&e same as t&e averageL =&y or ,&y notL (%croll to t&e rig&t to see t&e ans,ers")
33 3 0 1 4 14 5 41 3 5 +e#ian; %$era&e; +o#e;

&he mode is the most likely value the one that occurs most often. If no value occurs more than once or twice then the mode isn,t very useful. 8owever if a clothing retailer records the si@e of each dress sold then the mode is Fuite useful. It is the best-selling dress si@e. Excel,s M.$E function calculates the mode. &o use the M.$E function? Enter the formula LM.$E3datarange4 where datarange is any range that contains a set of values. Try it( .alculate t&e mode of t&e set of values in t&e a/ove spreads&eet" Go, many times does t&is value occurL (+gain0 ans,ers are to t&e rig&t")

6E1.E4TI!E0 O)+1TI!E 8unctions


*e often like to rank the values in a data set in some way. "or example if you can the '!& exam to get into college you essentially learn your ranking by a percentile. If you are at the 8= th percentile you know that 8=U of all people scored lower than you and only >=U scored higher. Excel has two useful functions for finding this type of information? 2E6CE9&I/E and GK!6&I/E. &he GK!6&I/E function is probably the easiest to understand. Imagine that you have >000 scores. 0ou sort them from low to high and then divide them into E sets of 1=0 scores each where the first set contains the smallest scores the second set contains the next smallest scores and so on. &he first second and third Fuartiles are the breakpoints between these sets. "or Chris !lbright 2age ;1>D>ED10>E

example 1=U of the scores are below the first Fuartile and :=U are above it. 3&he second Fuartile is the median.4 &o use the GK!6&I/E function? Enter the formula LGK!6&I/E3datarange k4 where k is > 1 or ;. "or example if you enter ; for k you get the third Fuartile. Try it( 8ind all t&ree Fuartiles for t&e follo,ing data set (,&ic& extends ,ell /elo, ro, 30)" Enter t&e formulas for t&ese Fuartiles0 la/eled O30 O20 and O@0 in column #" (%croll to t&e rig&t to see t&e ans,ers")
86/23 89/69 76/12 129/72 82/41 106/6 80/99 73/26 112/7 46/21 Iuartiles I1 I2 I3 0ercentiles 001 005 010 025 050 075 090 095 099

&he 2E6CE9&I/E function takes any percentage 3expressed as a decimal number4 and returns the value such that the given percentage of all values is below this value. "or example if we use the percentage >0U 30.>04 and the 2E6CE9&I/E function returns E= then we know that >0U of all values in the data set are below E= and R0U are above it. &o use the 2E6CE9&I/E function? Enter the formula L2E6CE9&I/E3datarange pct4 where pct is any percentage expressed as a decimal such as 0.>0 for >0U. Try it( 8ind t&e reFuested percentiles in t&e a/ove spreads&eet0 and place your formulas in column D" 8or example0 630 indicates t&e 30t& percentile" #o you see t&e relations&ip /et,een t&e Fuartiles and certain percentilesL (+gain0 ans,ers to t&e rig&t") 9ote that the GK!6&I/E and 2E6CE9&I/E functions are typically used on data sets with a large number of observations. If they are used on a very small data set you might be surprised at the results. In fact you might even disagree with them. "or example if the data set has the = values >0 10 ;0 E0 and =0 Excel,s 2E6CE9&I/E function indicates that the >0 th percentile is >E. &his is certainly not a very intuitive answer and you might disagree with it but we might ask why someone would want the >0th percentile of a =-value data set in the first place(

1+4-0 !+1DE0 %M+!! 8unctions


If we simply want to rank a set of values from > to where is the number of values Excel offers the 6!9S function. *e can either rank them from highest to lowest or vice versa. .f course an alternative is to sort the numbers. If for any reason we don,t want to sort then we can use the 6!9S function. &o use the 6!9S function? Enter the formula L6!9S3value datarange order4 where value is a single value in the datarange and order is an optional argument. If order is missing 3or 04 rank > corresponds to the largest valueA if order is > 3or any other non@ero value4 rank > corresponds to the smallest value.

Chris !lbright 2age ;;>D>ED10>E

&ypically we start with a data set in a column. &hen we use the 6!9S function to rank the first value and copy it down 3with datarange absolute4 to rank all of the others. If two or more values are tied they share a rank. Try it( 1an' t&e values in +32+30 from largest to smallest in column $" T&en ran' t&em from smallest to largest in column ." Go, does 1+4- deal ,it& t&e tied 55?sL (%croll to t&e rig&t for ans,ers")
55 66 76 34 55 68 75 44 38 58

&he /!67E and 'M!// functions are less well-known Excel functions but they can be useful. /et,s say we have a data set with 1=0 values and we want the >0 largest values. &hen we can find these with the /!67E function using arguments > through >0. 'imilarly we can use the 'M!// function to find the >0 smallest values. &o use the /!67E function? Enter the formula L/!67E3datarange k4 where k is any integer from > to the number of data values. &his returns the kth largest value. &o use the 'M!// function? Enter the formula L'M!//3datarange k4 where k is any integer from > to the number of data values. &his returns the kth smallest value. &ypically we would enter a seFuence of values of k in some column enter the /!67E or 'M!// formula for the first of them and then copy down. Try it( 8or t&e data set in column +0 ,&ic& extends ,ell /elo, ro, 300 find t&e 30 largest values and 30 smallest values in columns # and E" )se t&e values of k in column ." (%croll to t&e rig&t for t&e ans,ers")
679/02 1208/42 1635/72 729/63 1036/08 716/62 972/92 1175/68 1271/38 1048/93 1 2 3 4 5 6 7 8 9 10

%T#EV0 V+1 8unctions


Excel has a number of other statistical functions including those for measuring the amount of variability in a set of numbers. &he most widely used measures of variability are variance and standard deviation and Excel implements these with the -!6 and '&$E- functions. 3&hese

Chris !lbright 2age ;E>D>ED10>E

functions calculate the sample variance and standard deviation. &here are similar functions -!62 and '&$E-2 for calculating the population variance and standard deviation. "or large data sets)over >00 values say)the sample and population measures are practically the same.4 &he variance is essentially the average of the sFuared deviations from the average and the standard deviation is the sFuare root of the variance. Each measures variability but standard deviation is easier to understand because it is expressed in the same units as the data)dollars for example. +esides many data sets have the property that about <8U of the data are within > standard deviation of the average about R=U are within 1 standard deviations of the average and virtually all of the data are within ; standard deviations of the average. &o use the -!6 function? Enter the formula L-!63datarange4. &his is eFuivalent to L3'&$E-3datarange44W1 the sFuare of the standard deviation &o use the '&$E- function? Enter the formula L'&$E-3datarange4. &his is eFuivalent to L'G6&3-!63datarange44 the sFuare root of the variance. Try it( 8ind t&e average0 variance0 and standard deviation of t&e data in column +" T&en use .<)4TI8 to find t&e percentage of values t&at are ,it&in 3 standard deviation of t&e average" Is it a/out B7PL (%croll to t&e rig&t to see t&e ans,ers")
1034/44 877/35 794/42 828/45 765/9 1088/95 786/05 1523/02 920/48 777/23 %$era&e *ariance Stan#ar# #e$iation

8inancial 8unctions
Excel has a wide assortment of financial functions that are used by thousands of financial analysts every day. I,ll illustrate the most common of these. If you,re going to be a financial analyst you should become familiar with the others(

6MT 8unction
&he 2M& function is usually used to find the monthly payment for a car loan or a home mortgage loan. &he inputs are typically an annual interest rate a term 3number of months financed4 and the amount borrowed 3the principal4. &he 2M& function finds the amount you have to pay each month of the term. 2art of this payment is principal and part is interest. !t the end of the term you will have paid Bust enough to pay off the entire loan. &o use the 2M& function? Enter the formula L2M&3interestrate term principal4. "or technical reasons if you want 2M& to return a positive value you should enter the principal as a negative number. &he interest rate argument should be the monthly rate 3assuming you,re paying monthly4 which is the annual rate divided by >1.

Chris !lbright 2age ;=>D>ED10>E

Try it( %uppose you ta'e out a E@00000 loan for a ne, car ,&en t&e annual interest rate is B"75P and t&e term of t&e loan is @B mont&s" .alculate your mont&ly payment in cell $A" T&en use a data ta/le (t&e perfect place for one() to see &o, your mont&ly payment varies for terms of 2A0 @B0 A70 or B0 mont&s" (%croll to t&e rig&t to see t&e ans,ers")
0rinci al %nnual interest .erm 0ayment )304000 6/753 36 7ata table for ayment $ersus term

46V0 46V 8unctions


Much of the theory of finance is about the time value of money. +asically a dollar earned in the future is less valuable than a dollar earned today because the dollar earned today can earn interest. &o account for this we discount future inflows or outflows to get their present values now. If we have a future stream of inflows andDor outflows then the sum of all of their present values is called the net present value usually abbreviated 92-. If this stream is incurred at regular time intervals)at the end of each year say)then we can use Excel,s handy 92- function to calculate the 92- of the stream. &o use the 92- function? Enter the formula L92-3rate cashstream4. 8ere rate is the discount rate which is essentially the rate the company believes it can make on its money and cashstream is a stream of cash inflows or outflows that occur at the ends of successive periods starting at the end of period >. 9ote that if there is a cash inflow or outflow right away at the beginning of period > it should be entered outside the 92- function. &he reason is that it doesn,t need to be discounted. Try it( +ssume a company pays E3000000 at t&e /eginning of year 3 to get into an investment" It t&en receives t&e cas& inflo,s at t&e ends of years 3 t&roug& 5 s&o,n /elo," =&at is t&e 46V of t&is investment (inflo,s minus outflo,s) ,it& t&e given discount rateL #oes t&e 46V increase or decrease as t&e discount rate increasesL =&yL (%croll do,n to see t&e ans,er")
7iscount rate >nitial ayment 123 )1004000

2as" inflo?s at en#s of years Hear 1 >nflo? )204000 80*

2 )354000

3 )504000

4 )454000

5 )354000

If a company incurs cash inflows or outflows at irregular times such as Hanuary >= then May ;0 then Huly > and so on the 92- function cannot be used. 0ou could go back to your finance book to see how to discount future payments directly but there is an easier way using the little-known I92- function. &his function is actually part of the !nalysis &ool2ak that ships with Excel. Chris !lbright 2age ;<>D>ED10>E

8owever you might not have it loaded. &o check click on the .ffice button then Excel .ptions then !dd-Ins and then 7o. If the !nalysis &ool2ak item isn,t checked check it. &hen you can use the I92- function. &o use the I92- function? Enter the formula LI92-3discountrate cashvalues dates4 where discountrate is the same as with 92- and cashvalues and dates are a stream of pairs of cash values and the dates when they are incurred. &ypically the first cash value will be an outflow and the rest will be inflows. In this case the initial outflow 3investment4 should be included in the I92- function and the 92- will be discounted back to the date of this initial payment. &his payment should be entered as a negative number. Try it( 8irst ma'e sure t&e +nalysis Tool6a' is loaded" T&en find t&e net present value of t&e stream of cas& inflo,s s&o,n /elo,0 ,&ere t&e first is really a payment at t&e /eginning of 2005" (%croll do,n to see t&e ans,er")
7iscount rate 123

Stream of cas" flo?s 7ate 1-,an-05 25-+ay-05 15-Se -05 15-,an-06 30-,un-06 2as" <)854000= )224500 )314000 )654500 )554000 80*

I11 8unction
Companies often have investment opportunities where they pay initially and then get returns in the future. *hen discussing 92- I illustrated in the #&ry it(% exercise that the 92- of such an investment decreases as the discount rate increases. In fact for large enough discount rates the 92- will typically become negative meaning that the future returns are not enough to offset the initial cost. &he discount rate at which 92- changes from positive to negative is called the internal rate of return or I66. 'pecifically the I66 is the discount rate at which 92- eFuals 0. Companies are interested in I66 for the following reason. &hey typically have a hurdle rate that they use to discount potential investments. If the 92- of an investment is positive discounted at the hurdle rate it is worth pursuing. If it is negative it is not worth pursuing. 'tated eFuivalently the investment is worth pursuing only if its I66 is greater than the company,s hurdle rate. "ortunately Excel has an I66 function that calculates an investment,s I66)a tough calculation. !s with the 92- function we assume the investment is structured so that there is an initial cash payment at the beginning of year > and then regular cash returns at the ends of years > 1 and so on. &o use the I66 function? Enter the formula LI663cashstream rateguess4 where cashstream is a stream of cash flows where the first 3the initial payment4 should be negative and rateguess is an initial guess for the I66. &his seems strange. *hy should you have to guess at the answerJ It is because Excel calculates the I66 iteratively starting with your guess. 0our actual guess shouldn,t make any difference in the final answer except in unusual cases. Chris !lbright 2age ;:>D>ED10>E

Try it( 8ind t&e I11 for t&e follo,ing investment0 using an initial guess of 35P" =&at does t&is I11 say a/out t&e attractiveness of t&e investmentL (%croll do,n to see t&e ans,er")
2as" flo?s <initial $alue is a ayment= <)1004000= )354000 )454000 )404000 >11 )254000 )104000

!oo'up and 1eference 8unctions


I have heard an Excel expert make the claim that the -/..SK2 function discussed earlier is the most useful Excel function of all. *hether or not you believe this claim the -/..SK2 and 8/..SK2 functions are Bust two of some very useful reference functions in Excel,s arsenal. If you click on the fx button for online help on Excel functions you will see a /ookup and 6eference category of functions that includes -/..SK2 8/..SK2 and several others. I will illustrate a few of these others here. !lthough they are arguably not as useful as -/..SK2 they can definitely come in handy in certain situations.

I4#E 8unction
&he I9$EI function is useful for finding the value in a particular cell of a rectangular range. 0ou access this value by the index of the cell you want. 'pecifically you specify a row index and a column index. "or example if the range has >0 rows and 10 columns the index E 8 indicates row E and column 8 of the range. &o use the I9$EI function? Enter the formula LI9$EI3 range r!index c!index4 where r!index is an integer 3for row4 and c!index is an integer 3for column4. "or example the formula LI9$EI3$>>?"10 E 14 refers to the value in cell E>E the cell in the fourth row and second column of the range. If range is a single-column range then the c!index argument can be omitted. In that case LI9$EI3range r!index4 returns the value in row r!index of the range. "or example the formula LI9$EI3!>>?!10 ;4 refers to the value in cell !>; the third cell in the range. 'imilarly if range is a single-row range only c!index needs to be included. "or example the formula LI9$EI3+>0?E>0 ;4 refers to the value in cell $>0 the third cell in the range. Try it( 8ind t&e unit s&ipping cost from 6lant2 to .ity@ ,it& a formula in cell $B" T&en enter a formula in cell $30 t&at finds t&e unit s&ipping cost from t&e plant to t&e city specified in cells $7 and $>" T&is formula s&ould respond appropriately to ,&atever plant and city indexes are entered in cells $7 and $>" (%croll to t&e rig&t for t&e ans,ers")

Chris !lbright 2age ;8>D>ED10>E

-nit s"i 0lant1 0lant2 0lant3 -nit s"i 0lant 2ity -nit s"i

in& costs

2ity1 1/25 1/15 1/35

2ity2 1/35 1/45 1/45

2ity3 1/55 1/25 1/15

in& from 0lant2 to 2ity3 1 2 in& cost

M+T.G 8unction
&he M!&C8 function is handy for finding a cell in a range that matches a given value. It is often used in the following situation. 'uppose you have decision variable such as order Fuantity that needs to chosen so as to maximi@e some profit. 0ou enter some formulas that link order Fuantity to the profit. &hen you create a data table that finds the profit for a number of possible order Fuantities. &he M!&C8 function lets you locate the cell in the data table with the smallest profit. &o use the M!&C8 function? Enter the formula LM!&C83value range "!/'E4. &his returns the index of the cell in range that matches value. "or example if the match occurs in the third cell of the range this returns ;. &he last argument "!/'E indicates that we want an exact match. 3!ctually "!/'E can be replaced by 0 with the same effect.4 If there is no exact match the formula returns an error. &he M!&C8 function can also look for an inexact match by using third argument &6KE. I,ll let you look this up in online help. &he following spreadsheet indicates how M!&C8 can be used in conBunction with I9$EI. 0ou can imagine that a profit model has led to the table shown where each order Fuantity listed leads to the corresponding profit. "or this small example it is obvious that the largest expected profit is N= <E0 which corresponds to an order Fuantity of ;00. 8owever if inputs 3not shown4 that drive the profit model change the best order Fuantity and the corresponding profit could change. *e want formulas in cells +R and +>0 to show and the best profit and best order Fuantity regardless of where they appear in the table.
.able of rofit $ersus or#er Auantity Cr#er Auantity 0rofit 200 )54325 250 )54430 300 )54640 350 )54565 400 )54235 'est rofit 'est or#er Auantity )54640 300

&he formula in cell +>0 is LI9$EI3!;?!: M!&C83+R +;?+: 044. &he whole purpose of the M!&C8 function here is to provide the row index for the I9$EI function. &hat is we know the best order Fuantity is one of the values in the range !;?!: and we need to know which one. 'o we find a match for the maximum value in +;?+: to the values in +;?+:. In this case the maximum is the third profit so the formula is eFuivalent to LI9$EI3!;?!: ;4.

Chris !lbright 2age ;R>D>ED10>E

Try it( T&e ta/le /elo, s&o,s t&e profit for eac& order Fuantity and eac& unit stoc'out cost (along t&e top)" Enter formulas in t&e range $>2E> to find t&e /est order Fuantity for eac& unit stoc'out cost" (%croll do,n to see t&e ans,er")
0rofit for $arious or#er Auantities <column %= an# unit stockout costs <ro? 3= )2 )3 )4 )5 200 )54235 )54175 )54025 )44935 250 )54465 )54285 )54190 )54085 300 )54355 )54325 )54265 )54100 350 )54215 )54195 )54130 )54125 400 )54145 )54085 )54015 )54005 'est or#er Auantities

<88%ET function
&he .""'E& function allows you to reference a range 3or single cell4 relative to another cell. It is hard to appreciate unless you see some examples so I will present two below. &o use the .""'E& function? Enter the formula L.""'E&3cell r!offset c!offset height width4. 8ere r!offset and c!offset are integers that can be positive negative or @ero and height and width are optional positive integers. If either height and width are missing they default to >. &his formula returns a reference to a range that has height rows and width columns. &o find its upper left cell start at cell move r!offset rows down 3if positive4 or up 3if negative4 and move c!offset columns to the right 3if positive4 or the left 3if negative4. "or example the formula L.""'E&3!> 1 ; E >4 returns a reference to the range $;?$<. It is a range with E rows and > column and its upper left cell $; is offset from cell !> by going 1 rows down and ; columns to the right. !s another example the formula L.""'E&3"E 0 -;4 refers to a single cell 3because the last two arguments are missing4 and this single cell is ; columns to the left of "E namely CE. ! good example of the .""'E& function appears in the spreadsheet below. .ur company sells to a retailer and the retailer pays a certain number of months later as indicated by the payment delay 3in months4 in cell +>. &he sales occur as indicated in row E but the receipts from the retailer occur 1 months later as indicated in row =.
0ayment #elay +ont" Sales 1ecei ts 2 Cct 8o$ 7ec 3200 4600 5500 ,an 2500 4600 !eb 3300 5500 +ar % r +ay ,un 4200 2900 4500 2750 2500 3300 4200 2900

*ithout the .""'E& function we could simply put links in the 6eceipts row that point to sales 1 months earlier. "or example the formula for receipts in Hanuary would be LCE. +ut what if the retailer decides to delay payments by ; months instead of 1J &hen we would need to fix the links in the 6eceipts row. 8owever a clever use of .""'E& avoids this updating of links. *e use the formula C<88%ET(EA000*E$E3) in cell E= for Hanuary and then copy it across row = for the other Chris !lbright 2age E0>D>ED10>E

months. &his formula says to start in the Hanuary sales cell and go a certain number of cells to the left 3because of the minus sign4 where this number is specified in cell +>. &o see how it works try changing the value in cell +> to ; or >. 3*hat would go wrong if you changed this delay to E monthsJ 8ow would you fix itJ4 Try it( %uppose t&at a manufacturing company /uys ra, materials from a supplier" If t&e cost in any mont& is Ex0 t&e company pays A0P of t&is cost 3 mont& from no, and t&e ot&er B0P 2 mont&s from no," )se t&e <88%ET function to calculate t&e payments made in Kanuary t&roug& +ugust0 /ased on t&e costs t&roug& Kuly" T&ese calculated payments s&ould c&ange automatically if you c&ange t&e inputs in cells $32$2 and #32#2" 8or example0 ma'e sure your formulas react correctly if you enter 2 and @ in cells #3 and #2" (%croll do,n to see t&e ans,er")
0ercent ai# 403 603 Cct )14950 ?"en; 1 2 7ec )44150 mont" from no? mont"s from no? ,an )24500 !eb )34350 +ar )24850

+ont" 2ost 0ayment

8o$ )24900

!nother great use of the .""'E& function is to create a dynamic range name one that expands or contracts depending on the number of data values in a range. Consider the following spreadsheet where monthly sales values are entered in column + and the total of all sales values is calculated in cell E>. Every month an extra sales value and its month label are appended to the list in columns ! and +. *e can make the formula in cell E> automatically adBust to the appended values by using a dynamic range name.
+ont" ,an-05 !eb-05 +ar-05 % r-05 +ay-05 Sales )24450 )34140 )34250 )44510 )34680 .otal )174030

&o do this I selected the $efine 9ame dropdown from the $efined 9ames group in the "ormulas ribbon. In the 9ame box at the top of the resulting dialog box I entered 'ales as the range name. In the 6efers &o box at the bottom I entered the formula C<88%ET($303000.<)4T($2$)03). &hen I clicked on .S. "inally I entered the formula L'KM3'ales4 in cell E>. 9ote that C.K9&3+?+4 refers to the count of all numeric cells in column +. 'o this .""'E& function refers to a range that starts > cell down from cell +> and has as many rows as there are numeric values in column +. &o see how it adBusts enter a sales value for Hune in cell +: and watch how the total changes automatically. 9ote that C.K9&3+?+4 counts all of the numeric values in column + so if there were some other numbers down below sales they could mess up the logic in the .""'E& function. "or example suppose there were a numeric value in cell +>00. &hen given the data above

Chris !lbright 2age E>>D>ED10>E

C.K9&3+?+4 would return < so at that point the 'ales range name would refer to the range +1?+: that is < cells starting with +1. &he moral is that if you want to use dynamic range names it,s best not to include #Bunk% in the affected columns or rows. Try it( T&e follo,ing spreads&eet &as sales /y mont& and /y salesperson" =e ,ant to sum sales over all mont&s and salespeople in cell $2" .reate a dynamic range name t&at updates ,&en ne, mont&s are added and ,&en salesperson columns are added or deleted" T&en use t&is range name to sum sales in cell $2" (%croll across to see ans,er")
.otal sales ,an-05 !eb-05 +ar-05 % r-05 +ay-05 ,un-05 ,ul-05 Smit" )64700 )54800 )54000 )64700 )94400 )64200 )84700 ,ones )74400 )84900 )74900 )54800 )74800 )54800 )54300 9ilson )54800 )54500 )54900 )64000 )64700 )94400 )64900 7onal#s )94000 )74900 )84300 )94700 )84400 )84500 )74500

! great use for dynamic range names is with pivot tables. 'uppose you want to base a pivot table on a data set that is likely to expand 3or even contract4 as time goes on. 0ou can create a dynamic range name such as My$ata for the data set. &hen when the pivot table wi@ard asks for the data range enter My$ata. If your data set expands or contracts in the future all you need to do is click on the 6efresh pivot table button 3(4 to update the pivot table with the newest data. If you show this trick to your colleagues at work you,ll be a hero(

Chris !lbright 2age E1>D>ED10>E

You might also like