Excel 2007: Introduction to Formulas and Functions

Excel 2007: Introduction to Formulas and Functions

with Curt Frye

 


Excel 2007: Introduction to Formulas and Functions shows how to build impressive spreadsheets with the application's built-in capabilities. Excel expert and Microsoft Most Valuable Professional Curt Frye shares his vast knowledge of Excel, demonstrating how to build various arithmetic and statistical analysis formulas. Curt explains how to summarize values in sets of cells, create conditional formulas using IF and other related functions, and use validation rules to make data entry more accurate. He even teaches how to search for data within a list or table using the VLOOKUP and HLOOKUP functions. Exercise files accompany this course.
Topics include:
  • Copying and pasting the value results of a formula
  • Creating formulas to count cells that meet certain conditions
  • Connecting Excel to an external data source
  • Building a two-input data table
  • Summarizing data using an Excel table

show more

author
Curt Frye
subject
Business, Spreadsheets
software
Excel 2007
level
Intermediate
duration
2h 26m
released
Nov 11, 2009

Share this course

Ready to join? subscribe


Keep up with news, tips, and latest courses.

submit Course details submit clicked more info

Please wait...

Search the closed captioning text for this course by entering the keyword you’d like to search, or browse the closed captioning text by selecting the chapter name below and choosing the video title you’d like to review.



Introduction
Welcome
00:00(Music playing.)
00:03Hi! I'm Curt Frye.
00:05Welcome to Excel 2007: Introduction to Formulas and Functions.
00:09In this course, I'll show you how to use formulas and built-in functions to
00:12summarize your data effectively.
00:14I'll begin by explaining the difference between formulas and functions.
00:18Then using that knowledge as a base, I'll demonstrate how to create formulas
00:21that find the sum or average of groups of numbers.
00:23I'll also show you how to discover more information by using Excel Help system.
00:28We'll enhance your ability to analyze your data by showing you how to summarize
00:31cell data that meets conditions you define, round cell values up and down, and
00:35summarize your data using named ranges, data lists, and Excel tables.
00:39I'll show you how to find data in your worksheets using LOOKUP functions,
00:43create data validation rules to make data entry more accurate, find and fix formal
00:47errors and perform What-If analysis by creating alternative data scenarios that
00:51don't disturb your original workbook.
00:53In short, I'll show you how to summarize and analyze data using Excel's powerful
00:57array of formulas, functions, and other analytical capabilities.
01:01Let's get started with Excel 2007: Introduction to Formulas and Functions.
Collapse this transcript
Using the exercise files
00:00If you are a premium member of the lynda.com Online Training Library, you have
00:04access to the Exercise Files used throughout this title.
00:07Exercise Files for this title are arranged by chapter.
00:10I have six chapters and then all you need to do is double-click the chapter
00:14folder and you'll see the files that are used in that chapter.
00:18I have my Exercise Files folder on my desktop, but you can put it anywhere you want.
00:23If you're a monthly or annual subscriber to Lynda.com, you don't have access to
00:27the Exercise Files, but you can follow along with the movies or create your own
00:31assets and work from there.
Collapse this transcript
1. Introducing Excel 2007 Functions and Formulas
Familiarizing yourself with functions and formulas
00:00Many Excel commentators, myself included, tend to use the terms function and
00:04formula as if they meant the same thing.
00:07In fact, functions and formulas are quite distinct.
00:10In this lesson, I'll describe the difference between formulas and functions and
00:13show you how both work to help you summarize your data.
00:17A formula is a statement you enter into an Excel worksheet cell that
00:21calculates a value.
00:22In Excel, you always begin a formula by typing an equal sign.
00:26When you do, Excel knows that it is to treat the rest of the text you type into
00:29the cell is part of the formula.
00:32As an example, you can click a cell on your worksheet, type = 1+2, press Enter,
00:38and get the result of 3.
00:41You can also refer to worksheet cells in a formula.
00:43In this worksheet for example I have values and cells B3 and B4 which represent
00:48revenue for the years 2009 and 2010.
00:51If you want to find the sum of the values in those two cells, you could type
00:57=B3+B4, press Enter and you get the result.
01:03A worksheet cell displays the formula's result, but if you click the cell and
01:07look at the Formula Bar, which is just above the regular worksheet grid, you can
01:11see the text of the formula.
01:13Now, let's say that you want to perform a slightly more advanced calculation
01:16such as finding the average of the two values in cells B3 and B4.
01:20The long way to do that would be to type a formula in cell E2 such as =(B3+B4)/2
01:31and what this does is it adds the two values in B3 and B4 and then divides it by
01:352, which is the number of values.
01:37When you press Enter, you'll see the average.
01:40The problem with this approach is that it takes a long time to type in those
01:43formulas and it's really only practical to create formulas by hand from very
01:47simple mathematical operations.
01:50In many cases, it's much easier to use functions.
01:53A function is a built-in set of steps or algorithm that Excel can follow to find a result.
01:58To find the average of the values in cell B3 and B4 for example, I could type
02:02in an equal sign and then start typing the name of the Average function and press
02:08a left parenthesis.
02:10Now that I've pressed a left parenthesis, I can indicate which cells contain the
02:13values I want to add.
02:15Those cells are B3 to B4.
02:20When I type a colon it indicates to Excel that I'm defining a cell range.
02:24I'll talk about that more later on in this chapter in lesson 4, Using Cell
02:27References and Formulas.
02:30After you enter the cell references, you can type the right parenthesis and
02:33press Enter to end the function and you get the result.
02:36Now it's the same result as before, but you didn't have to remember how to
02:39compute an average or count the number values you were averaging.
02:43Now that you understand how functions and formulas work in Excel, you can dive
02:46into the main body of the course and start creating your own formulas.
Collapse this transcript
Creating a formula
00:00Excel formulas enable you to summarize the data contained in your worksheets,
00:04which helps you discover important information about your business.
00:07In this lesson, I'll show you the three main ways to create a formula in Excel:
00:11by typing, by using the controls on the Formula tab of the Ribbon User
00:15Interface, and by using the Insert Function dialog box.
00:19When you're ready to create a formula by typing, you click the cell where you
00:22want to create the formula and start typing.
00:26First, you type an equal sign, which indicates to Excel that it's to treat
00:30the remainder of the text in the cell as a formula as opposed to a number or text value.
00:35In this case, I want to find the average of the values in cells B3 through B10,
00:40so I will start typing the word Average.
00:43When I type the first few letters, Excel displays a list of functions that start
00:47with the letters I just typed.
00:48This feature is called Formula AutoComplete.
00:51If you don't see a list of functions when you start typing, someone must have
00:54turned off Formula Auto Complete in your copy of Office.
00:58I'll press these the Escape key twice, the first time to get rid of Formula
01:01AutoComplete list and the second time to stop entering data into the cell.
01:05Now I can click the Office button and click Excel Options to display the
01:11Excel Options dialog box.
01:13On the Formulas page of the Excel Options dialog box, you'll see in the Working
01:17with formula section a checkbox for Formula AutoComplete.
01:22If this check box is cleared, you should check it and then click OK.
01:27When you do, you will turn on the Formula AutoComplete and you'll be able to
01:30complete the rest of the lesson.
01:32Now, to enter the Average formula you type an equal sign followed by aver.
01:39When you do, you display the list of functions that start with those letters.
01:43The Average function is first on the list and it's already highlighted.
01:46If you wanted to select another one of the visible functions, you could use
01:50the Down Arrow key to highlight it, but in this case I want to use Average so
01:55I'll use the Up Arrow key to move back up and now that it's highlighted, I can press Tab.
02:01When you do Excel inserts the word Average, which is the name of the function
02:05you want to use and also hopefully gives you your left parenthesis, so you can
02:08start typing in your arguments.
02:11Now that I have the function ready to go, I can type in the cell range, which is
02:14B3 through B10, type a right parenthesis to end the function, hit Enter and
02:24my average appears in cell E3.
02:26To enter a formula using the controls on the Formula tab of the Ribbon user
02:29interface, you click the Formulas tab to display the controls available to you.
02:34The Excel 2007 Ribbon breaks out the functions by the type of calculation
02:38they perform, including financial calculations, Date & Time and Math and Trigonometry.
02:43I always thought that trig was part of math, but it's been a while since my last class.
02:48In this case I'll click AutoSum and then click Average.
02:51When I do, Excel creates an Average formula and it identifies cell E3 as
02:58a potential value for me to average. That's actually not the value range that
03:01I want to summarize.
03:02That's B3 through B10.
03:04So, I will type in that cell range B3:b10. And upper/lowercase doesn't matter, so
03:12I don't need to correct that and I already have my right parenthesis, which
03:15indicates the end of the function.
03:18I can press Enter and Excel gives me the same value as before. Just another way
03:22to create the formula.
03:24The final way to create a formula in Excel is to use the Insert Function dialog box.
03:28There are several ways to open the Insert Function dialog box.
03:32The most prominent is on the Formulas tab and it is here at the left side of the Ribbon.
03:37You can also click the Insert Function button just to the left of the Formula Bar.
03:42It doesn't matter which one you click; you end up in the same dialog box.
03:45So I'll click the Insert Function button here by the Formula Bar.
03:49You can use the controls in the Insert Function dialog box to find functions
03:53that you want use in your formulas.
03:55If you want to search for a function, you can type what you want to do in the
03:59Search for a function box.
04:00So let's say that I wanted to find an Average.
04:05That's what I want to do.
04:07When I click Go, Excel updates the Insert Function dialog box here in the Select
04:12a function list to indicate which functions help me find an average.
04:17The one at the very top is the one I want to use, Average.
04:20So it's selected and when I click OK, Excel displays the Function Arguments dialog box.
04:29Now, when you create an average, you can specify which cells that you want to average out.
04:34So in this case I want to average every cell from B3 through B10 except for cell B6.
04:41So I'm going to skip the value for the year 2006.
04:43So to create my arguments, I will type in the cell range B3 to B5.
04:51That's the first range that I want to summarize and you'll notice that Excel is
04:55filling in the values in the cell range over here.
04:59That's a great way to check yourself as you're typing in your formula using the
05:03Function Arguments dialog box.
05:05If the values don't look right, then you probably have your reference wrong.
05:09I want to summarize another range, which is B7 through B10, so in the Number2 box
05:17I'll type B7 through B10.
05:20Those are the only cell ranges that I want to summarize, so I can press OK and
05:28Excel creates the formula for me.
05:30Regardless of how you choose to enter your formula, you'll find that Excel has
05:33several ways to make the process easier for you.
Collapse this transcript
Introducing arithmetic operators
00:00Many Excel formulas include arithmetic operators such as the plus sign and the
00:04minus sign, but Excel doesn't just read your formula from left to right and
00:07take the operations in order. Instead Excel has a strict order in which it
00:12performs the operation.
00:14This worksheet displays the list of operators you can use in Excel and the order
00:17in which it processes them.
00:19I'll explain what the symbols mean and how they work within formulas.
00:23First, Excel checks whether a value is negative.
00:25That is if it has the minus sign in front of it.
00:28After that it checks if the value is expressed as a percentage.
00:31If the value is expressed as a percentage, then Excel treats it as if it were
00:35divided by 100. In other words 75% is the same as .75.
00:39So just by a way of a quick example.
00:42If I type in the value -15, Excel treats it as a value. -15.
00:49If I were to create a formula where I have -15 plus 75% then I will get
00:59the result -1425.00%.
01:05Now there are two things to note about this calculation.
01:08The first is that I wasn't taking 75% of 15 or in this case -15. Instead what
01:14I was doing was adding 75% or .75 to a negative number, so the answer would be -14.25.
01:23However, when you add, subtract, multiply or divide a number by a percentage,
01:28Excel expresses the result as a percentage.
01:31So -14.25 is actually -1425%, because again you're multiplying the value by 100.
01:40After verifying whether value is negative or whether it's expressed as a
01:44percentage, Excel starts with the other operations.
01:47The first priority after the negative sign and percentage is exponentiation
01:53where the value is multiplied by itself a specified number of times.
01:57The symbol for an exponent is the caret, which you type by pressing Shift+6 or
02:02as I think of it a capital 6.
02:04The formula equals two raised to the power of 3, 2 ^ 3, would produce the result of 8.
02:12That's 2x2x2.
02:15If I were to type in the formula = 2^4, I would get the result of 16.
02:23The next operations in order are multiplication and division followed by
02:27addition and subtraction.
02:29So let's say that I wanted to multiply 3x4. I would get 12 and if I subtract 3 from 4, I get 1.
02:43But what happens when you combine one or more of these operations, especially
02:47operations at a different level into a single formula?
02:50When you do, Excel examines the formula before it starts making any calculations
02:54and if it finds two operators at the same level, it performs those operations in
02:59left to right order.
03:00That is if you type in the formula =10/2*9+3, 10 divided by 2 would evaluate to 5,
03:12multiply that result by 9, which is 45, plus 3 which is the last operation in
03:19priority order, you type Enter and get the result of 48.
03:24You can change the order of operations in a formula by adding parentheses.
03:28As an example, let's take the formula =9*2+3.
03:35In this case it would be 9 times 2, which is 18, add 3 to the result and you would get 21.
03:41If you want to change the order so the addition happens first and then you
03:44multiply that result by 9, you would write the formula =9*(2+3), which equals 9 times 5 or 45.
04:00Finally, you can use the comparison operators equal, greater than, greater than
04:05or equal to, less than, less than or equal to and does not equal to create
04:10formulas that return a result of true or false.
04:12For example the formula =10=9 would return the result of FALSE.
04:20The formula =10 is not equal to, that's the less than sign and greater than sign,
04:259 would return a result of TRUE and finally 10>9 would return the result of TRUE.
04:35So when would you want to create a formula using these comparison operators?
04:39Well, comparing 10 to 9 isn't really a meaningful comparison, because it's
04:43obvious that 10 is greater than 9.
04:44Where you might use this type of comparison formula is if you have one cell
04:49that contains your sales goal for a month and another cell that contains your
04:54actual sales results.
04:56If your sales results are greater than your sales goal, then you could print
04:59TRUE to indicate that you should receive a bonus.
05:02If your sales results are less than your goal, then Excel could indicate FALSE
05:07which tells your supervisor that you don't get a bonus this month.
05:11Always be sure to verify that your formula's operations occur in the desired order.
05:15If you're getting an answer you don't expect, that's a great first place to
05:18look for an error.
Collapse this transcript
Using cell references in formulas
00:00When you create an Excel formula, it is possible to type values such as interest
00:04rates or commission percentages directly into the formula.
00:07But in almost every case, it's a better idea to draw the value from a cell in your worksheet.
00:11Putting a value in the cell both makes the value visible instead of hidden in a
00:14formula and enables you to change the value without editing the formula.
00:19I'll show you how to edit a formula later in this chapter, but for now I'll show
00:22you how to use cell references effectively.
00:25The most direct way to enter a cell reference into a formula is to type the reference.
00:29Let's say that you want to use the values from cells B4 and B5 in a formula to
00:33calculate your revenue for those months.
00:36To create that formula you'll type an equal sign and then type B4+B5 press Enter
00:45and you get the result.
00:47You can also enter a cell's address into a formula by clicking the cell when you
00:50come to the point of the formula where you want to put it.
00:53For example, if you wanted to find half of your revenue for a month, you could
00:56calculate that amount by typing an equal sign, clicking cell B5, which adds the
01:04cell reference to the formula, typing the multiplication operator, which is an
01:10asterisk or a capital 8 and then multiplying by .5.
01:14With that formula in place you can press Enter and you get your result.
01:19Now, let's say that you want to find your total revenue for two periods, January
01:23through March of 2008 and July through September of the same year.
01:27Those cells aren't all neighbors on the worksheet so you'll have to refer to
01:30them separately within your formula.
01:33To do that, you can create a sum formula for typing = SUM and now you type in the references.
01:43So January through March of 2008 are cells B3 through B5 and now I type a comma
01:52indicating that there is going to be another range and you'll notice that when I
01:56typed the comma, Excel updated the tooltip here beneath the formula that I'm creating,
02:02where it says SUM then I have my number 1 which is B3 through B5 and
02:07now when I start typing in after the comma, I'll be typing in 2.
02:12So I wanted July through September, so I have B9 through B11.
02:21Also notice that Excel outlines those groups of cells to indicate where they
02:27fit in the formula.
02:28B3 through B5 are outlined in blue. The reference is within the formula
02:33highlighted in blue, and notice that these cells B9 through B11 are in green and
02:40they are outlined in green on the body of the worksheet.
02:43So now when I type a right parenthesis, I hit Return and I get my total.
02:50You could create the same cell references by clicking and dragging the cells
02:53when you get to the right point of the formula.
02:55So let's say for example that I type in =SUM and I want to select B3 through B5,
03:03I can just click and select type a comma to indicate that I want to enter
03:08another cell range and select B9 through B11.
03:13I've created the formula, type a right parenthesis to close the function and
03:18I get the same result.
03:21So that's how to add disconnected cell ranges to a formula.
03:24But what if, for some reason, you want to perform a calculation on an entire row or column?
03:28For example, to find the total of every value entered into row 9.
03:33To find the sum of all values in a row, you type in this type of formula.
03:38So I'm going to try to find the value through row 9, so I don't want with
03:41my formula in row 9.
03:42If I type in =SUM, I can create a reference to an entire row by typing in
03:49the number of the row, in this case row 9, followed by a colon, followed by the 9 again.
03:57You notice when I did that Excel highlighted all of the visible cells in row 9
04:02and notice you'll just have to trust me but believe me when I tell you that that
04:05selection extends all the way to the right edge of the worksheet.
04:08So I can type a right parenthesis to close the function, hit Return and I get my result.
04:15One thing I should point out is that the value in cell A9, which is July, is a
04:20text value so it's not included in the summary operation.
04:24You can do the same thing to find the total of all the values in a column.
04:27So let's say that I wanted to get the total of all the values here in column E.
04:33to do that I create the formula =SUM(E:E), which indicates that I want to all the
04:41values in column E, hit Return and I get my value.
04:47Once again if you do create a formula that includes all of the values in a row
04:50or column, do not put the formula in a cell in that row or column.
04:55You'll create what's called a circular reference because the formula would refer
04:58to its own cell as part of its calculation and generate an error.
05:02Including cell ranges and formulas by creating effective cell references makes
05:06your job much easier.
05:07Whether you select cells or enter their addresses by hand, you can be sure you
05:11are summarizing the proper data when your references right.
05:14In the next lesson, I'll show you how to create cell references you can copy
05:17safely from cell to cell.
Collapse this transcript
Copying and pasting formulas and values
00:00Copying and pasting Excel formulas is in many ways similar to copying and
00:04pasting a cell's other contents, but there are some important differences
00:07you should be aware of.
00:08In particular there are times when copying a formula from one cell to another
00:12changes the formula's cell references.
00:14In this lesson I'll show you how to copy a cell's formula exactly as it appears
00:18in the current cell, how to copy and paste a formula's result instead of the
00:22formula itself, how to copy and paste a formula without taking along a cell's
00:26other formatting and how to create cell references that either don't change or
00:29change the way you want them to when you copy the formula to another cell.
00:33If you want to copy a cells formula to another cell without the possibility of
00:37any of the formula's references changing, you need to copy the cell's formula by
00:40selecting it on the Formula Bar.
00:43To do that you click the cell that contains the formula and then click on the
00:48Formula Bar so that it becomes active for editing.
00:52Now you can drag over the formula holding down the left mouse button so that
00:57text is selected, I will click Copy on the Home tab of the ribbon and then press
01:03Escape to release the cell.
01:04Now, I can go to another cell, say D4, click Paste and Excel pasted in the
01:11formula exactly as I copied it from the other cell.
01:14Now suppose you have a cell that contains a formula and you want to copy that
01:17cell's result but not the formula itself to another cell.
01:21To do that you click the cell, press Ctrl+C or click Copy to copy its contents,
01:27click the destination cell and then again on the Home tab of the ribbon,
01:32click the Paste button's down arrow and click Paste Values.
01:38When you do, Excel pastes the value from the formula, the result from the
01:41formula, but does not pastes the formula itself.
01:44The downside to this is that any time you change a cell that was providing an
01:49input for the formula, this value here will not change.
01:53So let's say for example that I change the value in Cell B5 from 8,100 to 10,000.
02:01I just increase the value by 1,900.
02:03These two cells here contain formulas that reflect the contents of B2 through B7,
02:08but this cell which contains only the result of the previous formula doesn't
02:13update because it no longer has any connection to these cells.
02:16It only contains a value.
02:17Normally, when you copy a cell by pressing Ctrl+C, you copy the cell's value or
02:22formula and its formatting.
02:24If you want to copy a formula from a cell without bringing along it's
02:27formatting, you can do so by using the Paste button's options.
02:30First you click the cell that contains the formula, copy it by clicking Copy on
02:34the Home tab or pressing Ctrl+C, click the cell into which you want to paste the
02:39result and then click the Paste button's down arrow and click Formulas.
02:46When you do, Excel pastes the formula but it does not bring along the formatting.
02:50You will notice that something interesting happened.
02:53In other words not only did the formatting go away but the result changed.
02:57And when you look up here in the Formula Bar, you see that the formula that I
03:01pasted into cell D8 is not the formula that I copied from cell D4.
03:06This formula is SUM(B2:B7) and this one is SUM(B6:B11).
03:12So it's off by five cells.
03:14Why did that happen?
03:16It happened because of the way I wrote the cell references when I created the formula.
03:20Excel recognizes two types of cell references, relative references, which can change,
03:24and absolute references, which can't.
03:27When you write a cell reference such as B4 without adding anything to the
03:30column letter or row number, Excel assumes that either value can change when you copy it.
03:34Here is an example where Relative References would come in handy, on the
03:39Revenue per Sale worksheet.
03:40Suppose you have a list of data where you want to find the average revenue per sale.
03:44In this column you have Revenue and in this column you have a list of the number
03:50of sales that generated that revenue.
03:51If I wanted to find the average per sale revenue for 2005, I would divide the
03:56value in B2 by the number of sales in C2.
04:03When I press Enter, I get the result.
04:06Now, suppose that I wanted to create a similar formula for the cell D3, D4, D5, D6 and D7.
04:12The hard way to do this is to create the formula by hand in each of these cells.
04:17So for example it would be = B3/C3, but you don't have to do that.
04:23Instead you can copy the formula from cell D2 down through the remaining cells
04:28and this is where relative references come in handy, because Excel will update
04:32the formula's cell references as I copy the formula down.
04:35So how do you to copy the formula?
04:37To do that, you click the cell and then grab the fill handle at the bottom right corner.
04:43You know that your mouse pointer is in position when it changes from the white
04:47Greek cross to a black crosshair.
04:51When it is, grab the fill handle and drag down until the selection covers all of
04:56the cells into where you want to paste the formula.
04:59When you release the left mouse button, Excel updates the formulas.
05:03So for example the formula in cell D3 refers to cells B3 and C3, D4 refers to B4
05:11and C4 and so on throughout the list.
05:14But let's suppose that you want to create an absolute reference, which is a cell
05:18reference that doesn't change.
05:19You do that by adding a $ sign to the front of the column letter, row number or both.
05:24Adding a $ sign makes that element of the formula, whether a row or column
05:28reference, absolute.
05:30So let's suppose that you enter the formula =$B$4 in cell F2.
05:39It refers to the cell here, the one outlined in blue, press Enter and I get my
05:44result of 9,100, which is correct.
05:47Now if I copy this formula down, I get the same results.
05:54Because I used an absolute reference this formula is B4, this formula is B4 and
06:00this formula refers to cell B4.
06:02Rather than type all these $ signs, there is an easier way to control whether a
06:06cell reference is relative or absolute.
06:09To do that, you click on the Formula Bar and then click anywhere in the middle
06:14of the cell reference that you want change and then you press the F4 key.
06:18The F4 key will cycle you through the four different possibilities for absolute
06:22versus relative references.
06:24If I press F4 now, it makes the column reference relative, meaning it can change
06:29and it makes the row reference absolute, meaning it can't.
06:31If I press F4 again, now the column is absolute and the row is relative.
06:36F4 again and both the row and column references are relative.
06:41Press F4 again and I'm back to what I had originally which is that the entire
06:45reference is absolute, both row and column.
06:48At first copying and pasting Excel formula seems to cause random changes to your worksheet.
06:53However, once you know how copying and pasting works, you'll find that you have
06:56a great deal of control over how your worksheet behaves.
Collapse this transcript
Editing a formula
00:00Excel worksheets evolve over time to reflect the nature of your business and how
00:04you analyze its data.
00:05So you'll almost certainly end up changing some of your formulas.
00:09You can edit Excel formulas in two ways: within the cell and on the Formula Bar.
00:14Editing a formula within a cell lets you change the formula without moving your
00:17mouse all the way up to the Formula Bar, so it can save your few seconds every
00:21time you want to make a change.
00:22To edit a formula within a cell, you double-click the cell that contains the
00:28formula you'd want to edit, click in the formula where you want to place the
00:31cursor and then Backspace or Delete over the text that you want change and
00:37in this case I will change the formula from a SUM function to an AVERAGE function.
00:44I have it spelled correctly and I can press Enter and now instead of having
00:48the sum of the values from B3 and B4, I've edited the formula so that it finds the average.
00:53If you'd rather edit a formula on the Formula Bar where you can see more of the
00:57formula at a time without the distraction of other worksheet elements, all you
01:00need to do is click the cell that contains the formula, click the text on the
01:05Formula Bar and you can click anywhere on the Formula Bar that you want.
01:10You don't have to do it near or in the formula and then you can edit.
01:14So let's just say that I want to change back to the SUM function, type it in,
01:20everything looks right, hit Return and I've edited the cell so it now finds
01:25the sum of the values in cells B3 and B4.
01:28Finally, if you're in the middle of editing a cell and decide you don't want to
01:31keep any of the changes you've made, you can press the Escape key to revert to
01:35the cell's starting condition.
01:37So for example, if I were here and I started typing in AVERAGE and I thought,
01:45no, I really want to keep SUM, the original formula that I had, I can press the
01:50Escape key once to get rid of the Formula AutoComplete display and then press
01:55the Escape key again and I'm out of the cell and it has reverted to its original formula.
02:00If you do press Enter after you change a cell's contents, you can always
02:03press Ctrl+Z or click the Undo button on the Quick Access toolbar to remove your changes.
02:09Editing a formula helps you refine your worksheet's contents to reflect your
02:12changing business needs.
02:14If you make a series of changes that won't be easy to reverse, you should make a
02:17backup copy of your workbook so you can have it around in case you want to
02:20revert to the original formulas or if you and your colleagues need to review the
02:24changes you've made.
Collapse this transcript
Getting help using Excel functions
00:00When you work with Excel workbooks you didn't create or that you haven't visited
00:04for a while, you might find that some of the formulas contain functions you
00:07either haven't used before or that you can't remember.
00:10If that's the case, you can use the Excel Help system to get information
00:13about those functions.
00:15If you want to display the main Excel Help screen, you can click the Help button
00:18near the right edge of the Ribbon's tab bar.
00:21The Help button is a blue circle with a white question mark in the middle.
00:26You can also press F1.
00:29When you click the Help button, the Excel Help window appears.
00:33You can use the controls in the Excel Help window to search for a term.
00:36Say, for example, if I wanted to find out about averages, I just type in
00:40average, press Return, and Excel returns results from my searched term.
00:45If you want to go back to the main page, you can click the Back button here and
00:51Excel returns you to the main page or whichever page you've visited previously.
00:56If you're having trouble getting online to view the Office Online Help
00:59resources, you can click the Show Offline Help Files link to work with only
01:03those files in your computer.
01:05It's also possible to view the help files for a specific function you're using
01:09to create a worksheet formula.
01:10To do that, you start editing the formula, say here on the Formula Bar,
01:15you click inside the function, in this case SUM.
01:20You click the function name, and then on the tooltip that appears below the function,
01:24point to the function name.
01:27You'll notice that the function, in this case SUM, is now highlighted in
01:31blue and underlined.
01:32That indicates it's a link.
01:34When you click the link, Excel displays the help file for the SUM function. I'm done there.
01:42Finally, you can display a function's help file from within the Insert
01:44Function dialog box.
01:46When you open the Insert Function dialog box, Excel displays the function
01:51arguments for the function that you've created.
01:53At the bottom left corner of the Function Arguments dialog box, you see the Help
01:57on this function link.
01:59When you click the link, Excel displays the help file for the function.
02:03The Excel Help system contains information on all of the functions available
02:06to you in Excel 2007.
02:08The Search function can return some strange results at times, but if you type in
02:12just a few terms that describe what you want to do, you'll find what you need.
Collapse this transcript
2. Creating Basic Summary Formulas
Creating a SUM or AVERAGE formula
00:00You use lots of different functions in your workbooks, but two of the most
00:04useful summary functions in Excel 2007 are SUM and AVERAGE.
00:09They operate as you'd expect, calculating the sum and average of a series of
00:12worksheet values, but I'd like to go over each function in detail so you'll
00:15have a greater appreciation of how they work.
00:18The SUM function adds a series of values together.
00:21You can express those values as numbers, such as the number 6, or as cell ranges where
00:25the cells contain numbers.
00:27As an example, consider a formula where you add the yearly sales for three years.
00:31The values appear here in cells, B2 through B4, so you can create a SUM formula.
00:36I'll start that out by typing =SUM(.
00:45Note that after you type the parenthesis, a tooltip appears below the formula.
00:49This tooltip gives you information about the function's syntax, which is the
00:53type of information the function needs to perform as calculations and the order
00:56in which it needs to receive these inputs.
00:59The SUM function expects you to enter a series of numbers or references to numbers.
01:03If there's more than one reference, such as if you wanted to add the values
01:06in B2 through B4 and the value in D2, you could separate the references using a comma.
01:12In this case, the formula you create would be =SUM(B2:B4,D2).
01:23When you type the right parenthesis and press Enter, Excel gives you the result.
01:27The AVERAGE function is very similar to the SUM function in that it allows you
01:31to enter in a series of values as cell ranges or numbers separated by commas.
01:35In this case, you can calculate the average yearly income for the three years
01:38listed in cells B2 through B4 by creating the formula =AVERAGE(B2:B4).
01:48The Excel programming team created the AVERAGE function so it added the values
01:52from the cells, and then divided the result by the number of individual values,
01:55resulting in the answer generated by those formulas.
01:58You might wonder what would happen if you try to create a sum or average formula
02:02to summarize non-numeric values, such as the labels in A1 or D1.
02:06The answer is that the SUM function treats the values as zero so adding them
02:09makes no difference.
02:10In other words, if I create the formula =SUM(A1,B2), Excel just returns the
02:21value in cell B2, 942,000, and it treated the value in cell A1, the text Yearly
02:28Revenue, as if it were zero.
02:30The AVERAGE function behaves slightly differently.
02:33If there is a number in at least one cell, the AVERAGE function ignores the
02:36non-numeric values and counts the number of cells that contain numbers.
02:40So for example, if I were to type =AVERAGE(A1,B2) and again I'm separating A1
02:49and B2 with a comma to indicate that they are separate ranges, right parenthesis, and
02:55I get the average of 942,000.
02:57Even though I summarized two cells, Excel only counted one numeric value.
03:02So it only divided 942,000 by 1. But let's see what happens if I type in an
03:09average formula that only refers to cells that contain text values or
03:13non-numeric values.
03:15So I have A1 and D1, when I press Return, Excel displays a #DIV/0! error.
03:23The reason that it was trying to divide by zero is that it counted no cells that
03:28contain a numeric value.
03:29Because of that it tried to divide by zero and it showed the error.
03:35The SUM and AVERAGE functions enable you to summarize your data quickly and once
03:38you understand how they work, you can apply that knowledge to other functions
03:41available to you in Excel 2007.
Collapse this transcript
Creating an AutoSum formula
00:00One of the most common formulas you'll create in Excel is a formula that finds
00:04the sum of a column of numbers.
00:06Excel enables you to create these formulas called AutoSum formulas with just a
00:10few clicks of the mouse.
00:12Creating an AutoSum formula that finds the sum of a column of values is simply a
00:16matter of clicking the cell directly below the values and then on the Formulas tab,
00:20in the Function Library group, clicking the AutoSum button.
00:24So I've already clicked the cell.
00:26Now I can go to the Formulas tab and then in the Function Library group, I can
00:33click the AutoSum button.
00:34Now notice that the AutoSum button is divided into two sections: the button
00:38itself at the top and then a down arrow at the bottom.
00:41I'm going to work with the button part on top right now and I'll show you how to
00:45use the controls on the down arrow list later.
00:48So I click the button and Excel creates the AutoSum formula.
00:52The formula is fully formed with parentheses and all, so you can press Enter to
00:56accept the formula as written.
00:58Just to verify, we have = SUM, which is what we want.
01:02The cell references are B3:B10 which are the cells represented by this moving marquee.
01:08I have a right parenthesis.
01:10When I press Enter, Excel finds the sum of the values in the column above where
01:14I created the AutoSum formula.
01:16I want to create another formula in that cell.
01:18So I'll press Delete to get rid of the existing formula and show you how to use
01:23the AutoSum button's down arrow.
01:25The down arrow contains a list of other functions that you can use in
01:30your AutoSum formula.
01:32The functions are Sum, which we just used, Average, which finds the average of
01:36the values, Count Numbers, which creates a formula that counts the number of
01:40cells in the group that contain numerical values, Max, which finds the maximum value,
01:45and Min, which finds the minimum or smallest value.
01:49If you want to use any other function, you can click the More Functions option
01:53to display the Insert Function dialog box.
01:56You can select the function you want to use and click OK, verify the cells
02:00you want to summarize up here in the Argument fields and click OK to create the formula.
02:04So let's say that I wanted to find the maximum value and yes, that is on
02:10the list, but let's just say I wanted to use that in this case, click OK,
02:14the Function Arguments dialog box appears and my cell range of B3:B10,
02:20which is here, is correct.
02:22So I can click OK and create the formula.
02:26That formula finds the maximum value, which is 1,749,000 and it's in cell B10.
02:33Creating AutoSum formulas help you summarize your data efficiently and get on
02:37with the more demanding tasks facing you in your workbook.
02:40Don't forget that you're not limited to the Sum function though.
02:43You can select any function you like from the AutoSum button's down arrow list
02:46or the Insert Function dialog box.
Collapse this transcript
Creating MIN, MAX, MEDIAN, and MODE formulas
00:00When you analyze a data set, it helps to discover information about your data,
00:04including the highest, lowest, and most common values.
00:07The Min, Max, Median, and Mode functions help you do just that.
00:12The Min function, as name implies, finds the minimum or lowest value in the cell range.
00:16So if I were to create the formula = MIN, which is the minimum function,
00:22(A2:A10), hit Return and you see the minimum value of 101, which in this
00:32case appears in cell A2.
00:35The Max function, by contrast, finds the maximum or highest value in the cell range.
00:41So I'll just create the same formula, =MAX(A2:A10), using the same cell range,
00:49hit Return and you find the maximum value of 135, which is in the cell A10.
00:54You might not be familiar with the Median and Mode functions, which are often
00:58used in descriptive statistics.
01:00The Median function finds the middle value in the cell range when the values are
01:03sorted in ascending order.
01:05For example, this series of nine values is sorted into ascending order and the
01:09fifth value, which has four values above it and four values below it is 125.
01:16So if I were to create the formula =MEDIAN(A2: A10) and hit Return, I get the value of 125.
01:28The reason that Excel displayed a value from the list is because it contains an
01:32odd number of values.
01:33The value in A6 has four values above it and four values below it.
01:37If you have an even number of values in your list, then the Median function
01:41returns the average of the two middle values.
01:44So, for example, if you had a list of ten values, then Excel would average value
01:48number five and value number six.
01:50The Mode function finds the most common value in a group of cells.
01:54In this list of values, the number 120 occurs twice and the number 125 occurs twice.
02:01So they are tied, but if I type in =MODE(A2:A10) and hit Return, Excel returns a value of 120.
02:16If there are two or more values that occur an equal number of times, the Mode
02:19function always returns the lowest of those values.
02:23You might also have heard of the calculation called the mean, usually, in the
02:26context of the mean, the median, and the mode of a group of numbers.
02:31The mean of a group of numbers is its average.
02:33So you can calculate it using the Average function.
02:36Finding the minimum, maximum, middle and most common values in the data set can
02:40give you important information about your data.
02:43For example, contractors can find the highest, lowest, and most common bid
02:46prices for raw materials and use that data to forecast their profits based on
02:50the amount they charge for labor and the cost of their inputs.
Collapse this transcript
Creating formulas to count cells
00:00Sometimes, rather than finding the sum or average of values in a range of cells,
00:04you'll just want to know how many cells in that range contain a number,
00:07any value at all, or are bank.
00:10Excel has a number of functions to count the number of cells in a range that
00:13contain a particular type of data.
00:15The Count function counts the number of cells in a range that contain numbers.
00:18So let's say that you have a worksheet that tracks light bulbs manufactured at
00:22your facility and lists the bad light bulbs found in a series of samples.
00:26You can use the Count function to discover the number of samples that have been
00:29taken during the day.
00:30So let's say that I create the formula =COUNT(B2:B10, right parenthesis
00:40to close out the function arguments, hit Return and I see that I had six measurements.
00:45If you look at the list, you'll notice that I do, in fact, have six numeric values:
00:49one, two, three, four, five, and six.
00:56So the result of six for the Count function is correct.
01:00The CountA function counts the number of cells in a range that contain any
01:04value, i.e., cells that aren't blank.
01:06The CountA function is useful if the result of a measurement might not be a number.
01:10For example, if the tester dropped a box of light bulbs before they could be
01:14tested for faults, you could put N/A or dropped in the cell to indicate the
01:18bulbs were pulled but no measurements were taken.
01:21So if I were to create the formula = COUNTA, referring to the cells (B2:b10).
01:31Again, capitalization doesn't matter.
01:32I just usually do it to make my cell references easier to read.
01:37I have COUNTA(B2:b10, right parenthesis, hit Return.
01:40You'll see that I have eight cells that contain any sort of data, one, two,
01:46three, four, five, six, seven, and eight.
01:49So the answer is correct.
01:51You can combine the Count and CountA functions in a formula to return some
01:54interesting results.
01:55For example, if you subtract the result of the Count function from the result
01:59of the CountA function, you'll find the number of cells that contain
02:03non-numeric values.
02:04The CountBlank function is the opposite of the CountA function.
02:08It counts the number of cells that are blank or contain no value at all.
02:12CountBlank function takes a series of cell ranges as its argument and is
02:15extremely useful for counting the number of values you need to complete an assignment.
02:19In this case, I want to see how many cells contain no data, which means that
02:23even though the bulbs might have been pulled, no result was recorded.
02:27So I'll type =COUNTBLANK and the cell ranges (B2:B10), hit Return, and I have
02:37an answer of one which is correct because the only blank cell in this range is cell B7.
02:44One situation where it might be useful to use the CountBlank function is if you
02:48need to input the number of hours that six employees worked on the contract
02:51during a given week.
02:52If the CountBlank function examines the cells where you're going to enter
02:55the values and that returns an answer of one, then you know there is one
02:58employee who hasn't turned in their hours and you can start pestering them for their input.
03:03These three variations on the Count function help you discover the number of
03:06cells in a given range that contain particular types of values.
03:09There are two other Count functions, CountIF and CountIFs, which is plural.
03:14I'll cover those two in the next lesson on summarizing cells conditionally.
Collapse this transcript
Creating formulas to summarize cells conditionally
00:00Most of the formulas you create in Excel will always perform the same calculation.
00:05For example, you might need to multiply a sales total by 5% to commute the
00:08transaction sales tax.
00:10There will be times, however, when you only want to perform calculations if the
00:13inputs meet one or more criteria.
00:16In this lesson, I'll show you how to use conditional functions to perform
00:19specific calculations when those criteria are met.
00:23Let's start out by creating an IF formula.
00:26An IF formula tests the value and uses the result to determine which of two
00:29actions to take. One if the test is true and one if it's false.
00:33For example, the salesperson might receive a 10% bonus for exceeding the
00:38monthly revenue target.
00:39In that case, you could create the formula, =IF(C2>B2).
00:48What that comparison does is determine whether the value in cell C2,
00:53actual sales, is larger than the value in B2, which was the sales goal for the quarter.
01:00So, there is the test, and now what is the calculation that I want Excel to
01:04perform if the value is true, in other words, if the test is met?
01:08In this case, I want to give the salesperson an extra 10% on the commission.
01:12So instead of getting 10%, I would give them 11%, which is a 10% increase over
01:18their original commission.
01:19So, if the value is true, I'll type in C2* 0.11, which represents an 11% commission.
01:30That looks correct and I'll type a comma to move to the last argument, which is
01:35what to do if the value is false.
01:38In other words, if the actual sales are less than or equal to the goal, then we
01:43give the salesperson a 10% commission.
01:45So that would be C2*0.1.
01:50That's the last argument that I'm going to add.
01:52Type a right parenthesis. Hit Return.
01:56And you see that in this case, the salesperson would get a 10% commission, which
02:00is 1/10th of this value.
02:02Now, when I created this formula, I used relative references.
02:06That means those references will change when I copy the formula down the column.
02:10So if I click this cell, which I have, grab the fill handle and drag it down to
02:16cover the last cell next to the final row in the data list, you'll see that
02:21we have the commissions calculated here.
02:23So, Jones exceeded their quota.
02:26So they got an extra 10% commission. Frye, an outstanding salesperson, exceeded
02:31his quota and got the extra commission as well.
02:33175,000 is exactly on target, but does not exceed it, so there was no bonus and
02:40the remaining values are calculated correctly as well.
02:45Now let's go on to the other conditional functions that are available to you.
02:49The first I'll talk about is the SumIF function.
02:52The SumIF function allows you to identify which rows from a data list you
02:56want to add together.
02:57The list in this worksheet shows yearly revenues for a company's three divisions.
03:02If you wanted to find the sum of the revenue from the North division for the
03:04year summarized in this list, you could create a SumIF formula.
03:09You start by typing =, followed by SUMIF, and left parenthesis.
03:16The first SUMIF function argument is the range argument, which identifies the
03:20cells you want to examine using a criteria.
03:23In this case, you want to find rows that contain North.
03:26So you type in the range B2:B17, which are the cells that could potentially
03:33contain the division named North.
03:34Now you type a comma and type in the criteria surrounded by double quotes.
03:40In this case, I want to search the cells B2 through B17 for the term North.
03:44So I'll type "North".
03:49That's the end of criteria, so I will type a comma.
03:52Make sure that the comma is outside the double quotes or the formula.
03:55We'll try to match the string in North, instead of just North.
03:59After the final comma, you type in the range of values that you want to add up.
04:03Those values occur in cells C2 through C17, which contain the divisional revenue figures.
04:12Type a right parenthesis to close the formula.
04:16I have a result, which I will now format using currency of $2,371,128.
04:26You can use other comparison operators such as greater than and less than in your criteria.
04:30For example, if you wanted to find the total of all yearly revenues that are
04:33greater than or equal to $750,000, you could change the range argument, which
04:38names the cells to which you want to apply the criteria to C2 through C17, and
04:50modify the criteria which currently says North to >=750,000.
05:00When you type a number in as a criteria, it's important that you do not use a comma.
05:05If you use a comma, Excel will think that you're trying to put in the next
05:09argument in the function and it will generate an error.
05:12So now that we have that formula set up, we can hit Return and we'll get the result.
05:17The total of all cells that contain values greater than $750,000 is $4.8 million.
05:23There are two other functions that enable you to summarize data using a single criterion.
05:27Those functions, CountIF and AverageIF, count the number of cells that meet a
05:31criterion or find the average of the numerical values in rows where value in one
05:35column meets the criterion.
05:37In this sample data list, you could create a formula to count the number of
05:40cells that contain values greater than or equal to $750,000 and find the average
05:44of sales for the East division.
05:46So, for example, if I wanted to count the number of cells that contain values
05:54greater than $750,000, I can create a CountIF formula.
05:58Then we have C2:C17, and the criteria is greater than or equal to $750,000.
06:12Close it with a double quote, close it with a right parenthesis,
06:16hit Return and you see that there are six such cells.
06:20If I wanted to find the average of those values, I can type in =AVERAGEIF(.
06:28The range that I want to examine is again C2:C17, the criteria is >=750000, and
06:42the values that I want to average also occur in the range C2:C17 and yes, you do
06:48need to type it in twice.
06:49The reason is that you have the range here, which is the range that Excel looks
06:53into to determine whether or not to include the row in the calculation.
06:57This range tells Excel which cell within that row to use.
07:01So we have C2:C17, right parenthesis to close, hit Return, and you see that the average value is
07:11just a little bit over $802,000.
07:15The AverageIF function is new in Excel 2007 as our three functions that enable
07:19you to identify data rows using multiple criteria.
07:22Those new functions are SumIFs, AverageIFs, and CountIFs.
07:27The S on the end of those function names indicates that you can use multiple criteria.
07:32As an example, I'll create a SumIFS formula that finds a total of all sales for
07:37the West division during the year 2009.
07:40To create that formula, I'll type in =SUMIFS(C2:C17, and that argument
07:50represents the sum range, in other words the numbers that we'll be adding up as
07:54part of the SumIFs function.
07:57Then I'll type in my first criteria range, in other words the column or the
08:00cell range that I want to examine to determine whether or not to include the
08:04row in the calculation.
08:05So the first one I'll create is for the division name that would be B2:B17, comma for
08:12the next argument, and now I can type in my criteria to apply to that range.
08:17In this case, I want it to be =West. Now I can type in the criteria range too.
08:27For that I'll type in A2:A17, those are the years, comma, and the criteria that I want
08:35to apply is whether or not it's equal to 2009, right parenthesis to close the formula,
08:42hit Return, and there is the result of my formula.
08:48The AverageIFs and CountIFs function use the same syntax as a SumIFs function.
08:53Once you can create a SumIFs formula, you can create AverageIFs or
08:56CountIFs formulas too.
08:59Creating conditional formulas might seem confusing at first, but after you
09:02create a few, they'll become second nature.
Collapse this transcript
Summarizing data on the Status bar
00:00Creating a formula in Excel 2007 just takes a few seconds, but there might be
00:04times when you want to find the sum or average of a series of numbers without
00:08saving the results in your worksheet.
00:10If that's the case, you can select the cells and have Excel display some
00:13summaries on the status bar at the bottom of the workbook window.
00:17When you click a single cell, no summary appears on the status bar.
00:21That's because there is really nothing to add, the only value you're looking at
00:25is the value in the selected cell.
00:27But now look what happens if you select two or more cells.
00:32When you do, Excel displays a number of summary operations here on the status bar.
00:37By default, you get the Sum, the Count, which is the number of cells that you've
00:42selected that actually contain data, and finally, the Average of those values.
00:46You can change which values are displayed on the status bar by
00:49right-clicking and using the Tools on the Customize Status Bar pop-up menu
00:53to control what appears.
00:55Any item that is checked currently appears on the status bar.
00:58So, for example, we have Average and also there is value in Count and
01:03finally, we have Sum.
01:05If you wanted to show the maximum value, you could click Maximum and Excel
01:09would add that value to the status bar.
01:11If you want to remove a value, click it again and it removes the checkbox.
01:17When you're done, just click anywhere off of the Customize Status Bar pop-up
01:20menu and it will disappear.
01:23Summarizing the contents of a few cells on the status bar helps you answer
01:26questions about your data, without going to the trouble of creating a worksheet
01:30formula you won't bother to keep around.
01:32It's a great way to perform quick summaries without altering your workbook or
01:35disrupting your workflow too much.
Collapse this transcript
Rounding cell values up and down
00:00You've probably rounded values up quite a few times in your life.
00:03At a restaurant, you can round the bill up to the nearest $10 increment and tell
00:07the server to keep the change, or describe the cost of the new building as about
00:11$10 million even though the price is a little bit lower.
00:14Excel 2007 has several functions you can use to round off worksheet values.
00:18You should become familiar with them so you can determine which is the best
00:21function for your particular task.
00:23The most familiar rounding function is Round, which takes two arguments, the
00:27value to be rounded, and the number of digits to the right of the decimal to
00:31which you want to round the answer.
00:32As an example, suppose you want to round the value 12.875, shown here in cell
00:37A2, to two decimal places.
00:39To do that, you would create the formula =ROUND(A2,2.
00:46Again, A2 represents the cell where the value is that you want to round and 2
00:51is the number of digits to the right of the decimal point to which you want to round it.
00:56Type a right parenthesis and hit Return, and you see that Excel rounds the value to 12.88.
01:02Excel, by default, rounds any value of .5 or greater up.
01:06So, for example, if you are rounding value to the nearest value of 10,
01:11the number 5 would be rounded up to 10, and the number 4 would be rounded down to zero.
01:16You can also use the Round function to round the tens, hundreds, thousands or larger values.
01:20To round to the tens, which is one digit to the left of the decimal point,
01:24you would make the second argument -1, and press Enter.
01:31When you do, Excel rounds of value 12.875 to the nearest value of 10, which is 10.
01:37The Round function rounds any value of .5 or higher up and rounds the rest down.
01:41If you'd prefer to have Excel round any number that contains a decimal value to
01:44the next higher number, you can do so using the RoundUp function.
01:48This type of calculation is common when a phone company calculates the number of
01:52minutes you've used on your cellphone, where a partial minute of any length
01:55counts as a full minute against your plan.
01:58The RoundUp function takes the same arguments as the Round function.
02:01So the formula =ROUNDUP(A3, 0, which rounds to the nearest whole number,
02:12would round up to 12.
02:14Again, the RoundUp function rounds any decimal value up to the next higher number.
02:20By contrast, the RoundDown function rounds a value down.
02:23For example, assume that you want to round a value to the hundredths place.
02:27To do that, you would create the formula =ROUNDDOWN(A4, -2. Again, the -2 refers
02:39to the number of digits to the right or left of the decimal point.
02:42Positive numbers go to the right, negative numbers go to the left.
02:46So in this case, we have -2, which means that we're rounding to the hundredths.
02:50Type a right parenthesis, hit Return, and there you have the value.
02:54Even though 1160 is higher than halfway to the next value of 100, we use the
03:00RoundDown function, so any partial value is discarded and we round down to the
03:06closest value, which in this case is 1100.
03:08Now let's suppose you want to round a number to the nearest one-half or to the
03:12nearest quarter or to the closest value of seven.
03:16To do so, you use the MRound function.
03:19The MRound function takes two arguments: the value to be rounded and
03:23the multiple to which you want to round it.
03:24For example, if you round the value in cell A5 to the closest multiple of
03:29one-half, you would create the formula =MROUND(A5, 0.5) and hit Return, and
03:41Excel rounds the value 11.6 down to 11.5.
03:45If the value in the cell were 11.8, Excel would round it to 12, as so.
03:55Excel rounded the value up to 12, because 12 is the next highest multiple of one-half.
04:00The rounding functions I've shown you give you a great deal of control over how
04:03Excel handles your numbers.
04:05Once you establish the rule by which you want to round your worksheet values,
04:08you can create a formula that follows that rule.
Collapse this transcript
3. Sorting and Filtering PivotTable Data
Summarizing data using named ranges
00:00So far all the formulas I have shown you use cell references such as A3 or A2:A5 to
00:06designate which cell should be summarized in the formula.
00:09Those references worked just fine.
00:10But it can make it hard to understand exactly which data your
00:13formula summarizes.
00:15You can make your formulas easier to comprehend by assigning names or groups of
00:18cells and then using those named ranges in your formulas.
00:22The most straightforward way to create a named range is to select a cell range
00:25and then type a name for the range in the Name Box at the top left corner of the worksheet.
00:30The Name Box is the box that normally displays the address of the active cell or
00:34when you're in the process of dragging to select the cell range, the size of the
00:37range that you select it.
00:39Let's say I wanted to create a named range for the cell summarizing divisional
00:42sales for the years 2009 through 2011.
00:45To do that, I would select the cells that contain the values, but not the
00:49labels, click in the Name Box and type Year2009to2011. When I press Enter,
01:00the Excel creates the named range.
01:02If I want to select the cells in that named range, I can click the Name Box's
01:06down arrow and select the named range from the list that appears.
01:12When I do, Excel selects the cells, and you'll also notice that Excel has
01:17displayed a summary of the information in those cells here in the status bar.
01:22So we have the average value, the number of selected cells and also the sum of
01:26the value in those cells.
01:28Another, way to create a named range is by displaying the New Name dialog box.
01:32To do that, you click the Formulas tab on the Ribbon and then in the Defined
01:36Names group, click Define Name.
01:40When you do Excel displays, the New Name dialog box.
01:43You can use the controls in the New Name dialog box to define your range name.
01:48I'll create another range name that identifies the same cells that I did before.
01:53So in this case, I want to make the name RevenueTo2011. I can add a comment if
02:01I like, just Sales revenue and then identify the cells to which the named range applies.
02:08So in this case I have a Ref Edit control that I can click. I select the cells
02:15that I want to be in the named range, click the Ref Edit control again, to
02:19bring back the controls in the dialog box and I see that I have Divisions,
02:24which is the name of my worksheet, and the cell range C2:13, which were the
02:30cells that I selected here.
02:32The Scope field requires some explanation, so I saved it for last.
02:35A named range of scope refers to where in the workbook you can use the
02:38named range and formulas.
02:40The most common choice and the default choice is Workbook, which means you
02:44can use the named range and formulas anywhere in the workbook where you define the named range.
02:48If you click the Scope box's down arrow and select Worksheet, where the
02:52cells of the named range reside, then you can only use the named range and
02:55formulas on that worksheet.
02:57So for example, our named range is on the Divisions worksheet.
03:00If I were to click the list and click Divisions then, I could only use the
03:04RevenueTo2011 named range in formulas on the Divisions worksheet.
03:10So I'm done creating my new named range.
03:12Now I will click OK.
03:14The final way I will show you how to create a named range is to create the names
03:17from a selected group of cells.
03:19Let's say that as I have here on the Sales Revenue worksheet that I have two
03:26columns of data, one for Revenue and one for Sales Count.
03:30Notice that each of these columns has a label on the top and this time, I will
03:33select them along with the data.
03:36After I select the cells, I can go to the Formulas tab of the ribbon, and then,
03:40in the Defined Names group, I can click Create from Selection.
03:46When I do, Excel displays the Create Names from Selection dialog box and Excel
03:50will assign names to the named ranges it creates, based on the values that
03:54it finds in the area selected within the dialog box.
03:57So for example, it can create the named ranges from the Top row, Left column,
04:02Bottom row or Right column.
04:03In this case, my data is laid out as a column so that means that my headers
04:08occur in the top row.
04:10That is the default choice. I'll leave it selected and I can click OK.
04:14When I do, Excel creates the named ranges Revenue and Sales Count, which you can
04:19display by clicking the Name Box's down arrow.
04:25Now that you've created a named range, how to use it in a formula?
04:28The easiest way to do so is start creating the formulas such as =SUM, type a
04:37left parenthesis, and then start typing the name of the named range.
04:42In this case, I'll make mine Sales_ Count, which you see appears here in the
04:47Formula AutoComplete list.
04:48It is highlighted so I can press Tab.
04:51And now when I type a right parenthesis to close out the formula the total of
04:57that named range appears as the formula's result.
05:00Named ranges make your formulas as much easier to understand.
05:04You should take the time to create a few of them and start using them in your formulas.
05:07You'll be glad you did.
Collapse this transcript
Creating a dynamic named range
00:00In the previous lesson, I showed you how to create named ranges that refer to
00:03groups of cells and make your formulas easier to understand.
00:07The one major limitation of those named ranges is that they can't change in size
00:11to reflect new data added to the list.
00:13As an example, suppose you have a list of sales figures in column C and you want
00:17to add a value to reflect new results.
00:19If you do, the cell that contains the new value won't be included in the named
00:23range unless you either edit the named which I'll show you how to do it later in
00:27this chapter or create a dynamic named range that will change in size when you
00:31add or remove data creating a dynamic named range that will change in size when
00:34you add or remove data.
00:35Creating a dynamic named range is somewhat advanced technique that uses a
00:36formula to define the cells included in the range.
00:39But the good news is that you don't need to know exactly what the formula does.
00:43You just need to know enough to modify the formula to reflect the contents of your worksheet.
00:48In this case, the cells that currently contain the data you want to summarize
00:51using the named range appear in cells C2 through C5.
00:55To create a dynamic named range that refers to those cells, on the Formulas tab
01:00of the Ribbon, click Define Name to display the New Name dialog box.
01:06In the Name field type SalesTotal and then in the Refers to box at the bottom,
01:16you type this formula =OFFSET left parenthesis sheet1, which is the name of the
01:27active worksheet, explanation point, which allows you to identify the cells
01:31within the worksheet that will be included into this dynamic named range.
01:36Now, I can type in $C, $2, which is an absolute reference to
01:45the cell C2, 0,0 and again, you don't need to know what these arguments do.
01:51Just all you need to know is how to implement this formula. Comma, COUNTA, which counts
01:58all the cells that contain any value left parenthesis sheet1 again, the current worksheet,
02:05!$C: $C, which defines the entire C column on this worksheet,
02:16right parenthesis, -1 and I'll tell you why the -1 is there in a second, 1 and a right parenthesis.
02:26If I typed everything correctly, when I press OK, Excel creates a dynamic named range.
02:32So let's go back and review that formula one more time from within the Name Manager.
02:37What the formula does is starting with cell C2 on Sheet 1, count the number
02:42of cells in columns C that contain a value, subtract 1 from that count to
02:46ignore the label in cell C1, and defines the range by counting down that
02:50number of cells from C2.
02:51For example, if there were four values it would create the range from C2 to C2 + 3 cells, or C5.
02:59When you click OK, Excel creates the named range, which you can now use on a formula.
03:05I'll close the Name Manager.
03:07I'll do that here in cell F1 by typing =SUM(SalesTotal) and the named range of
03:17appears in the formula Auto Complete list, but I'll just type it in.
03:21So we have SalesTotal and notice that we're referring to every cell in column C.
03:27When I hit Return, I get the total.
03:30Now let's see what happens when I type a value in cell C7 and press Enter.
03:35So lets say that I have a result for 2010, Quarter number 1, and the Sales were 500,000.
03:42When I press Enter, Excel updates the result in cell F1, and the reason that
03:48happened is because it is referring to the dynamic named range SalesTotal and
03:53cell C6, which now contains a value, is part of that named range now.
03:58There are two things you need to watch out for when using dynamic named ranges.
04:02The first is that you can't have any blank cells in the list of values to be summarized.
04:06If you do, Excel will count the non-blank cells and end up one cell short of the list.
04:11For example, if I were to type a value into cell C8, Excel wouldn't be able to
04:15include that cell as part of the dynamic named range.
04:18If I were to move the value back to cell C7, it would be able to because
04:22there's no black cell.
04:23Now let's see what happens if I delete the value.
04:25So I added A6 through C6.
04:30If I were to delete the values in those cells, Excel changes the dynamic named
04:34range definition again, and updates the result of the SUM formula, SUM of
04:38SalesTotal, to reflect the new state of the dynamic named range.
04:42The other consideration with dynamic named ranges is that they don't show up in
04:46the Name Box's list.
04:48In this case, clicking the down arrow would not display any named range.
04:53I don't know why that's the case, but it is.
04:55Dynamic named ranges help you summarize changing list of data while still
04:59creating human readable formulas.
05:01What's more, unlike Excel tables, which I'll cover later in this chapter, dynamic named
05:05ranges are compatible with Excel 2003 and earlier versions of the program.
Collapse this transcript
Editing and deleting named ranges
00:00Just like every other workbook element, you can edit and delete named ranges
00:04after you create them.
00:05In Excel 2007, you can work with your named ranges using the Name Manager.
00:11To edit a named range, click the Formulas tab on the ribbon and then in the
00:15Named Ranges group, click Name Manager.
00:18The Name Manager displays all of the named ranges in your workbook,
00:21their definition, their scope and any comments you might have stored with them.
00:26You can change the named ranges' definition by editing in the contents of the
00:29Refers to box, which you display by clicking a named range and then you can edit
00:35the reference down here in the Refers to box.
00:39You can also edit the named range by clicking the named range in the list here
00:43and then clicking the Edit button.
00:46The Edit Name dialog box is pretty much the same as the New Name dialog box.
00:50The major difference, aside from title, is that you can't change a named range scope.
00:55If you want to change a named range scope from Workbook to Worksheet or
00:58vice-versa, you need to delete the named range and create a new one. Just close that.
01:06One handy aspect of how Excel manages named ranges is that if you change the
01:10named range's name, Excel updates all of the formulas using that range to
01:13reflect the new name.
01:15It's a nice touch that keeps you from generating slew of errors whenever you
01:18decide you want to call a named range something different.
01:20If you want to delete a named range, you can click the range, and then click the
01:26Delete button and click OK to verify that you want to delete it.
01:30When you do, Excel removes the named range from your workbook.
01:34Clicking the Filter button and selecting an option limits the named ranges that
01:37are displayed in the dialog box.
01:40You can display just those named scoped to the workbook level,
01:42at the worksheet level, names that contain errors, and so on.
01:48When you are done making any changes to your named ranges, click the Close
01:50button and you'll hide the Name Manager.
01:54The Name Manager is the control center for your named ranges.
01:57If you want to create, change, or delete a named range, the Name Manager is the
02:00tool you want to use.
Collapse this transcript
Summarizing list data by creating subtotals
00:00Excel 2007 makes it possible for you to summarize large data list effectively,
00:04but part of analyzing your data is limiting the display to the groups of data
00:08that interest you the most.
00:09If you want to summarize your data and be able to narrow down which data Excel
00:13displays, you can create subtotals.
00:16To create subtotals for your data list, the data must meet certain criteria.
00:20First, the data must be in a series of columns, each column must have a
00:24header, there may be no blank rows in the list and the data must be sorted in
00:28ascending order using the leftmost column as the first sorting key, the second
00:33as the second and so on.
00:35The data in this list meets those requirements.
00:38It is an unbroken list, the columns have headers and there are no blank rows.
00:43In addition, the data is sorted by year, by a quarter, which is a group of three
00:47months, and then by month.
00:49With the data in shape, you can click any cell in the list and then on the Data
00:53tab of the ribbon, in the Outline group, click Subtotal.
00:58When you do, Excel displays a Subtotal dialog box.
01:02The first selection you can make is how many subtotals you want to create.
01:06The default is to create a subtotal for each change in the value in the first
01:09column, in this case Year.
01:11I will leave it there for the moment and come back to it.
01:14You can also select which summary function you want to use.
01:17The most common choice is Sum but you can select from several other functions.
01:21Finally, you identify which columns contain the values you want to summarize.
01:25In, this case, the Revenue column is the only one that contains values that can
01:28be summarized meaningfully but if you had another column that listed the number
01:32of transactions in a month, you could add a subtotal to that column as well.
01:37The three checkboxes at the bottom of the dialog box indicate whether you
01:40want to replace the existing subtotals, you do, Create a page break between
01:44groups, you usually don't, and whether to put the summaries below the data to which it refers.
01:49I find it easier to read summaries that are below the data it summarizes, so I
01:52also leave that box checked.
01:54When you're ready, click OK to create the subtotals.
01:58As your choices in the Subtotal dialog box indicated, Excel created a subtotal
02:02formula below the last value for the year 2009, another below the last value for
02:062010 and a Grand Total below the entire list.
02:10The outline bars at the left edge of the worksheet indicate where each
02:13group begins and ends and it gives you controls that you can click to hide or show data.
02:18To hide a group, you click the collapse button, which looks like a box with a
02:22minus sign in the middle of it.
02:23Clicking it hides the details for the group, but showing only the summary.
02:27If you click to Expand button, which is a box with the plus sign, it restores
02:31the details to the display.
02:33Now let's take a look at the subtotal formula itself.
02:36The formula in Cell D14 is =Subtotal(9,D2:D13).
02:43The function name is easy enough to understand as this cell range D2:D13, but
02:48what does the first argument, the number 9, mean?
02:50The answer is that is a reference to the function the subtotal formula uses to
02:54summarize your data.
02:56Unlike in previous versions of Excel, where you needed to memorize which
02:59function number meant which summary operation, Excel 2007 displays them for you.
03:04To see the list, edit the formula and backspace over the number 9.
03:08There are two sets of functions you can use in the subtotal formula.
03:12The first set, numbered 1 through 11, operates on all values in the list whether
03:17they are hidden or not.
03:18The second set, numbered 101 through 111, summarizes only the values currently
03:23displayed in the list.
03:24Now let's go back and create our subtotals at a different grouping level.
03:27I will click Escape to get out of the Edit and then on the Data tab, click Subtotal.
03:34This time I will create the groups of a Quarter level and click OK, and again,
03:40I have the Replace current subtotals checkbox selected, so I'll be replacing the
03:45existing subtotals instead of adding to them.
03:48When I click OK, Excel outlines my data.
03:52Notice that there are subtotals after each quarter but not after each year.
03:56In other words, there is a subtotal after quarter number 4 from 2009, but there
04:00is no grand total or supplementary subtotal for the year of 2009, the summaries
04:06are only organized by quarter.
04:08Now I will edit the Grand Total formula, which is at the bottom of the outline,
04:15so that it only summarizes visible data.
04:18To do that, I will change the summary operation from 9, which summarizes all
04:22cells to 109, which summarizes all visible cells, and I have 109 and the
04:28formula looks correct. I'll click OK.
04:30I will press Enter.
04:33When I do, you notice the Grand Total formula result didn't change but I do have
04:38my new subtotal formula.
04:39Now when I hide a group using the collapse controls on the Outline bar, such as
04:43for the second quarter of 2010, Excel hides those values and it updates the
04:51result of the Grand Total formula.
04:53If I click the Expand button, Excel restores the rows to the data list and
04:59updates the Grand Total formula again.
05:01Finally, I'd like to point out that if you want remove the subtotal outlining
05:04from your data list, you click any cell on the list and then on the Data tab of
05:09the Ribbon in the Outline group, click Subtotal, and click Remove All.
05:15Creating subtotals helps you summarize your data quickly based on the
05:18subdivisions you define.
05:20In the next lesson, I'll show you how to define custom outline groups so you
05:24don't have to rely on Excel to create them for you.
Collapse this transcript
Grouping and outlining list data
00:00In the previous lesson, I showed you how to have Excel create subtotals that
00:03group and outline your list data.
00:05Creating a subtotal is often a great first step toward creating useful
00:08outlines, but custom groups give you even more control over how Excel
00:12summarizes your data.
00:14This data list is already grouped at the year level and has the quarter level
00:17available for grouping as well.
00:18But let's say that your company runs an annual sale during the months of March
00:22and April, which don't fall within the same quarter.
00:25To create custom groups for March and April of each year, you select the cells
00:28for March and April in 2009, just click any two cells in the column, and then,
00:35on the Data tab of the ribbon, in the Outline group, click the Group button.
00:39When you do, Excel asks whether you want to group the rows or the columns.
00:43We want to do the rows, so click OK and Excel creates a group.
00:48But notice, because this is a data list as opposed to an Excel table, which
00:52I'll cover later in this chapter, Excel did not apply the same grouping to the
00:58same months for 2010.
00:59So to do that, you just select the rows that correspond to the rows you selected here,
01:04on the Data tab click Group, verify that you want to group the rows and
01:10click OK to create the group.
01:12To ungroup a set of rows, select the cells in the rows on the Data tab of the ribbon,
01:17in the Outline group, click Ungroup.
01:21You want to ungroup the rows, so click OK, and you can do the same thing up
01:26here, for March and April of 2009.
01:30As before, you'll need to ungroup each group individually or you can click
01:34any cell in the list, click the Ungroup button's down arrow and then click Clear Outline.
01:42When you do, Excel removes the entire outline but it retains the Subtotal and
01:46Grand Total formulas.
01:47If you want to get rid of the subtotals as well, you can click Subtotal
01:53and click Remove All.
01:55Grouping and outlining rows in a data list lets you control exactly which data
01:58you want to display in your worksheet, which is especially helpful in
02:01presentations where you want to emphasize particular points. What's more,
02:05grouping and outlining is compatible with Excel 2003 and earlier versions
02:08of Excel, so you will be able to collaborate with coworkers who might not
02:12have upgraded to 2007.
Collapse this transcript
Summarizing data using an Excel table
00:00In Excel 2007 these list objects became Excel tables, which are much more useful
00:05when analyzing data in Excel.
00:07Creating Excel tables makes it easier for you to manage your data.
00:11You create an Excel table by clicking any cell in the data list and then on the
00:15Home tab of the Ribbon in the Styles group, clicking the Format as Table button,
00:21and then selecting a table format.
00:23I will select this one.
00:26Take a look at the values in the Format as Table dialog box, verify that Excel
00:31has correctly identified the data to be included in the table, and that it has
00:34identified your table has a header row, and then you can click OK.
00:40If you ever want to change an Excel table's formatting, you can click any cell
00:43in the table, and then on the Design contextual tab of the ribbon click the
00:48Table Styles gallery's More button and select the new format.
00:54Excel creates tables with names such as Table1 and Table2, but you can and
00:59should change those names to describe the data the table contains.
01:02To rename an Excel table, you click any cell in the table and then on the
01:07Design contextual tab of the ribbon, in the Properties group, you type a new
01:12name in the Table Name box.
01:15In this case, I have company sales, so I will call the table CompanySales.
01:23Press Return and it changes the name of the table.
01:27Every Excel table in a workbook must have a unique name.
01:30If you want to add a row of data to an Excel table, you have two options.
01:33The first option is to click the cell at the bottom right corner of the table,
01:38and then press the Tab key.
01:41When you do, Excel creates an entirely new table row.
01:44So I'll just type in some data.
01:462011, Quarter number 1, the month of January, and a value of 500,000, and press Return.
01:59Note that in column D where I typed in the sales figure, Excel applied the
02:03formatting from the cell above and gave me a currency format.
02:07You can also start typing in a row directly below the existing table.
02:11So for example, if I were in the row 27 and I started typing 2011 and pressed Tab
02:17to move to the next cell to the right, Excel creates a new table row.
02:22So, for this I'll click 1, February and I'll type in a result of $520,000.
02:30Press Return and I have a new row in my table.
02:33Another great feature of Excel tables is that you can display the total row to
02:37summarize each column.
02:38To display the total row you click any cell in the Excel table, and then on the
02:43Design tab, in the Table Style Options group, you check the Total Row box.
02:50When you do, Excel displays the total row at the bottom of the Excel table.
02:55The cell to the right edge of the total row usually contains numeric data.
02:58So, Excel creates a subtotal formula there. Unlike when you create subtotals
03:02using the controls on the Data tab of the ribbon, where Excel creates a
03:06subtotal formula that summarizes every cell in the column, when you create a
03:09table, Excel summarizes the column using a subtotal formula that considers only visible cells.
03:14So, in the previous lesson where we created a subtotal outline for a data
03:19list, but not an Excel table, when you created the subtotal formula, Excel made
03:24this argument 9, which was to find the sum of all cells regardless of whether
03:29they were hidden or not.
03:30When you create an Excel table, Excel uses a function number 109, which finds
03:35the sum for only those cells that are visible.
03:38You can't create subtotals for an Excel table, but you can group and ungroup rows.
03:43To do that, you select cells and the rows that you want group, say March and
03:46April, and then on the Data tab of the ribbon click Group.
03:52Verify that you want to group the rows and click OK.
03:56You can then use the expand and collapse controls to hide or display the data in
04:01the rows that you grouped.
04:02Now notice that I grouped March and April 2009.
04:06When I hit those values Excel updated the formula result here, the subtotal
04:10formula, because it only summarizes cells with the visible values.
04:14When I click the Expand control, Excel redisplays those two cells, those two rows,
04:20and updates the subtotal formula.
04:23I will remove that group. Click OK.
04:28There is another way to limit the data that appears in an Excel table, which is filtering.
04:33When you create an Excel table filter arrows appear at the right edge of each
04:36cell in the header row.
04:38Clicking a column's filter arrow displays the tools at your disposal to create filters.
04:43You can create two kinds of filters on Excel tables.
04:45Selection filters and rule filters.
04:49A selection filter, as the name implies, enables you to identify individual
04:53values you want to include or exclude.
04:56In this list for example, I can clear the Select All checkbox for the Year
04:59column and then select the year 2009.
05:04When I click OK, Excel limits the data in the Excel table.
05:08So, it only displays values from the year 2009.
05:11Note that Excel hides the rows from 2010, and 2011, and updates the total of the
05:18subtotal formula here.
05:19To clear the filter, I'll click the arrow and click Clear Filter from Year,
05:26when I do, Excel restores the data.
05:28I can also filter it by rule.
05:30Let's say that I only wanted to display months with sales levels over $400,000.
05:35To create that filter, I would click the Sales columns filter arrow, point to
05:40Number Filters and then click Greater Than.
05:43So, I have a custom filter and I only want to show rows where Sales is greater
05:49than 400,000 everything looks good.
05:53I'll press Enter, and Excel filters the data in the Excel table, again,
05:58displaying only those rows that contain values greater than 400000, and
06:03updates the result of the subtotal formula in the Total Row.
06:06If I want to remove the filter, I'd click the Sales fields filter arrow button,
06:12and click Clear Filter from Sales.
06:15One downside of Excel tables is that they're not compatible with
06:18previous versions of Excel.
06:20If you find that you and your colleagues have problems during workbook that contain Excel tables,
06:24you can convert the table to normal cell range.
06:26To do that you click any cell in the Excel table, and then on the Design
06:31contextual tab, in the Tools group click Convert to Range.
06:37Excel displays a dialog box verifying that this is what you want to do.
06:40When you click Yes, Excel retains your formatting, but changes the Excel table
06:45over to a normal cell range.
06:47Excel tables help you summarize your data effectively and as you'll learn in
06:51the next lesson, also help you create formulas that are easy for you and your
06:54colleagues to interpret.
Collapse this transcript
Referring to Excel table cells in formulas
00:00Excel tables provide a structure within your workbooks that you can use to store your data.
00:05One major benefit of using Excel tables is that you can refer to table columns
00:08in your formulas using the table and column names, which makes your formulas
00:12easier for you to interpret.
00:14Excel tables consist of rows and columns of data.
00:17You can include an entire column of data in a formula by creating what is called
00:20a structured reference, which names the table column you want to include.
00:25To refer to Excel table data in the formula, you type in = sign, followed by the
00:30function you want to use, in this case I will just use SUM and type a left parenthesis.
00:36Now I can type in the name of the table.
00:38This tables name is SalesData, so I will start typing in Sal and you will
00:42notice that the table name appeared in the Formula AutoComplete list.
00:47The name is selected, so I can press Tab to add it to the formula.
00:52Now I need to name the column, and in this case I want to use Sales.
00:57To name a column, I type a left square bracket,
01:01and when I do, Excel displays a list of items that I can use in this formula.
01:06In this case, I want to summarize the SalesData column, so I type in Sales, type a right square bracket
01:15to close the reference to the table column, type a right parenthesis to close the formula
01:20function and hit Return.
01:22The remainder of the items in the Formula AutoComplete list represents
01:25different parts of the table.
01:26So I will just show you what they are, I'll go back in and edit the formula.
01:30I do need the left square bracket.
01:34All, as the name implies, refers to the entire table.
01:38Data refers to everything except the header row.
01:41Headers refers to just the header row.
01:43And Totals refers to the contents of the total row.
01:47Finally, This Row refers to the table row that is in the same worksheet row as
01:51the cell that contains the reference.
01:53I'll show you how that works.
01:55Let's say that I wanted to create a formula here in cell F5 that summarizes all
02:00the numerical values in row five of the worksheet.
02:03In other words, these cells here.
02:08Now the result in this case isn't going to make any sense, because I'm adding a
02:11year to a quarter to a sales figure but I just like to illustrate how the
02:15formula would work, if the values did make sense to add together.
02:18So to create this formula, type = SUM, left parenthesis and now I can type the table name,
02:26which is SalesData. It's selected.
02:28I will press Tab to accept it.
02:30Type a square bracket and now I'll type This Row. I've clicked it and press Tab to accept it.
02:40Type a square bracket to close the column reference. Type a right parenthesis to close the formula's function.
02:49Click Return and there we have all the values in row 5, 498,073 + 2 + 2009.
02:59Like dynamic named ranges, which I described in the creating a dynamic named
03:03range lesson earlier in this chapter,
03:05formulas that refer to entire table column's updates
03:07reflect any data that's added or taken away from that column.
03:11If I were to add another data point to the column, so let's say go for 2011,
03:19Quarter number 1, Month of January and type in $500,000,
03:26Excel would update the result of the formula that finds the sum of every value
03:30in the SalesData table's Sales column.
03:34Referring to Excel tables in your formulas makes your formulas easier for you
03:37and your colleagues to understand.
03:39But remember that Excel tables can only be used in workbooks created in
03:42Excel 2007 and later.
03:44If you collaborate with users who still have Excel 2003 or earlier versions of
03:48the program you should use dynamic named ranges to refer to data columns that
03:52could expand or contract.
Collapse this transcript
Finding data using VLOOKUP and HLOOKUP formulas
00:00When you maintain lists of data in Excel, you'll find it useful to be able to
00:03lookup values in those lists.
00:05Rather than page through your data by hand or use the Find feature, you can
00:09create formulas that enable you to enter a lookup value in a cell and have Excel
00:13return related information from a list or an Excel table.
00:16The lookup formula you use to find data in a table depends on whether your data
00:21is laid out by column, in which case you use VLookup.
00:24The V stands for vertical, or by row in which case you use HLookup.
00:28The H stands for horizontal.
00:30VLookup formulas let you type a value into a cell, and then search the leftmost
00:34column of the data list or Excel table to find that value.
00:37When it does, Excel returns a value from the column you specify in the same row
00:42where it found the Lookup value.
00:44As an example, here's a table named Parts Data that contains several part
00:48numbers, part name, and the price for the parts.
00:51You create a VLookup formula by typing an equal sign followed by VLookup.
00:57When you type the left parenthesis, you'll get a list of the
00:59functions arguments.
01:00The first three arguments, lookup_value, table _array, and col_index_num, are all required.
01:07The final argument, range_lookup, determines whether the VLookup formula can
01:11return an approximate match to the lookup term, or whether you require an exact match.
01:16Setting the argument to True or leaving it blank allows an approximate match,
01:20while setting it to False requires the formula to find an exact match.
01:24The first argument asked for the cell that contains the value you want to lookup.
01:28In this case that value will appear in cell F1, so that is the cell address I
01:33will type for the first argument, and then type a comma to indicate that I'm done,
01:37and I'm ready to move on to the second argument.
01:40The second argument asks for a reference to the cells that contain the data list
01:43you are working with.
01:45You can type the reference as a cell range, such as A3 to C7, or you can type
01:50the name of an Excel table.
01:52In this case I know the table is named Parts Data, so that is what I'll type in.
01:59The third argument specifies the table column where I want the formula to find its result.
02:03In this case, that's the second column, so I will type the number 2 to indicate
02:08the second column from the left and then type a comma.
02:11I don't want Approximate Matches, in other words, I want to have an Exact Match
02:15for the part number that I type in.
02:17So I'll set the range_lookup argument to False.
02:22Type a right parenthesis to close out the function, and hit Return.
02:26I haven't typed a value in cell F1 yet, so the VLookup formula returns an #N/A error.
02:31However when I type the part number P001 into cell F1, and hit Return, Excel
02:38returns the value Spark plug.
02:40And again, just to walk through the formula, the VLookup formula finds a value
02:45in F1, in this case P001.
02:48It looks in the cell range, in this case the Parts Data table, which is here.
02:53It looks in the first column by default to find the part number, which is P001,
02:59and then it looks in the second column in the same row where it found P001, and
03:04it finds the result Spark plug, which is the value it would put in cell F2,
03:08which is the cell that contains the VLookup formula.
03:11If I change the value in F1 to P002, Excel updates the result of the VLookup formula.
03:20Now I have P002, which is here in the Parts Data table, and the value in the
03:26second column of that row is Rotor, which is the value that appears in cell F2.
03:31If I type the value P100 into cell F1 and hit Return, Excel returns the #N/A
03:38error that we saw before.
03:40The reason is that I'm requiring exact matches and because there is no exact
03:44match of the term P100, Excel displays the error.
03:47Now let's look at a case where it's okay to allow approximate matches in
03:51the VLookup formula.
03:52I'll use a different example this time on the Discounts worksheet.
03:56And this is an Excel table that shows the discount available for customers who
03:59order a given quantity of auto parts.
04:01The Discount levels are at 1, 10, 100, 1000 and 10,000 units.
04:06Obviously very few of your customer's orders will be in exactly those quantities.
04:10So, you need to allow approximate matches.
04:13Remember that if you'll leave the range_lookup argument blank, or set it to
04:16True, then the VLookup formula can find either an exact match, or an approximate match.
04:21In other words, setting the range_lookup argument to True tells the formula yes,
04:24you can return an approximate match.
04:26If the formula doesn't find the exact value entered into your input cell,
04:30it returns to the next largest value that is less than the Lookup value.
04:34Note that this table is sorted into ascending order based on the contents of
04:39the leftmost column, which is column number 1.
04:42If the table isn't sorted by the values in the leftmost column and you allow
04:45approximate matches, the VLookup function will generate an error.
04:50You can sort the table's contents by clicking any cell in the leftmost column,
04:53and then on the Data tab of the Ribbon, click the Sort Smallest to Largest,
04:58which is sorting in ascending order.
05:00So now, let's create our VLookup formula.
05:05In this case, creating the formula the VLOOKUP(F1, which is the cell that will
05:12contain the value I am looking up, and then the name of the table, which is
05:15DiscountList, which appears in my Formula AutoComplete list, comma and then we
05:21have 2, which is the column from which I want to return the value, type Return,
05:27type a right parenthesis.
05:29Hit Return and Excel displays the familiar #N/A error.
05:33But in this case that's okay because I don't have a value in F1.
05:36Now I can start typing values into F1 and show you how the formula returns its results.
05:41Let's say that I wanted to have an order with the quality of 10. When I type in 10, I get 5%.
05:47Now let's see what happens if I type in the value of 11, which is greater than
05:5110 but less than 100, so it doesn't qualify for a 10% discount.
05:55Type in 11, hit Return and I still get 5%, which is correct for an order of the quantity.
06:02If I type in 100 and hit Return, I get 10% discount, which as you can see from
06:08the table is correct.
06:09Now, let's say that I have an order quantity of 50,000, which is larger than the
06:16largest value in this table.
06:18When I hit Return, I get 20% discount, which is the maximum discount allowable.
06:24And finally I'll show you how to generate an error using this type of formula.
06:28The lowest value in this table, in the leftmost column is 1.
06:33So, if I type a value in that's less than 1, I should get an error.
06:37So, I have a quantity, I'll type in 0, which is less than one, hit Return and
06:42I get the #N/A error.
06:44The final function I would like to show you is the HLookup function.
06:48Where VLookup uses vertical list, in other words, lists that are arranged by
06:51columns, HLookup uses lists that are arranged in rows.
06:55So I'll go to the HLookup worksheet, and I'll show you the table that I have.
07:01Well, it's not really a table, but it is a selection of values that are laid out
07:05in rows instead of in columns.
07:07So, we have our headers, Shelves, Washers and Bolts, and this is the number of
07:11parts that you would need to put together a bookcase with a particular number of shelves.
07:15If you want to know the number of washers required for a bookcase with five shelves,
07:18you would create this formula in cell I2.
07:23That is =HLOOKUP(I1, which is the cell that will contain the number of shelves,
07:32comma, A3:F5, which is the table where I want to look up the data, comma and then 2.
07:432 is the row from which I want to return the value.
07:46In other words, the HLookup function finds a value in the first row, as opposed
07:51to the first column, and then it finds the value in a corresponding row that you name.
07:56In this case, it's row number two, so we will find the number of washers.
08:01Type the right parenthesis, hit Return and I get the #N/A error, because there
08:05is no value in cell I1.
08:09I'll type in 5, which is the number of shelves, hit Return and you'll see that
08:13it returned the correct value.
08:15I was looking for the number of washers that I would require for a bookcase with five shelvess.
08:21Here in F3, we have the number five, indicating five shelves, and the number of
08:26washers is 20, which the formula returned correctly.
08:29Note that in this HLookup formula, I did not type a final argument, which is the
08:34range_lookup argument.
08:35Setting that argument to True or leaving it blank allows an approximate match.
08:39While if you require an exact match, you set it to False.
08:43That argument works exactly the same way in HLookup as it does in VLookup.
08:47The only difference between the two formulas is that the first row must be
08:51sorted in left to right order, if you allow approximate matches.
08:55In practical terms, you'll use VLookup much more often than you use HLookup,
08:59but it's good to know that HLookup is available you if you need that type of functionality.
Collapse this transcript
4. Preparing Data for Analysis in Excel
Importing data into Excel
00:01If you work with colleagues who don't have access to Microsoft Excel, you can
00:04have them export their data to a text file or a Comma Separated Value File.
00:09As the name implies, a text file contains a series as numbers or individual
00:12values are separated by spaces, tabs or some other character.
00:16The most common separating character is the Comma, hence the name Comma
00:20Separated Value File.
00:22To bring data from a text to a Comma Separated Value File into Excel,
00:25you click the Data tab on the ribbon and then in the Get External Data group click From Text.
00:32When you do, Excel displays the Import Text File dialog box.
00:36In this case my file that I want to bring in is in my Exercise Files
00:41folder, Chap04, DataSource.
00:47When I double-click the file or if I just click it and click Open then Excel
00:51displays the Text Import Wizard.
00:54The first Text Import Wizard screen shows a preview of your data and asks if the
00:57source data file contains data that is delimited, that is separated by specific
01:02characters or whether each data field is of a fixed width.
01:06Most modern applications generate Comma Separated Value Files, but you will find
01:10a lot of older applications particularly those in the payroll departments,
01:14they create files for each field has a fixed number of characters.
01:17In this case, the source file is delimited by commas, so I will leave the
01:21Delimited option button selected and click Next.
01:25On the second page of the Text Import Wizard, you get to select which character
01:28delimits or separates one value from another.
01:32In this case, it's the Comma, so I will clear the Tab Delimiter checkbox and check Comma.
01:40When I do, the Wizard updates the Data Preview pane to indicate how it will
01:43separate the data when it brings it into Excel.
01:45The preview looks correct, so I will click Next.
01:49The final Text Import Wizard page lets you assign data types to the
01:52imported files columns.
01:54Leaving the General option button brings in numeric values as numbers, dates as
01:57dates and everything else as text, which works for the vast majority of files.
02:01So, I will leave the General option selected and click Finish.
02:05After I click Finish, the Import Data dialog box appears asking where you want
02:10to import your data.
02:11You can click the RefEdit button at the right edge of the existing worksheet box
02:15to select the cell you want at the upper left corner of the imported data.
02:18Usually that's cell A1 or select the New Worksheet option to create a new
02:22worksheet and import your data there.
02:24Clicking the Properties button at the bottom left corner of the dialog box
02:27displays the External Data Range Properties dialog box.
02:30I will show you how to control your Data Connections properties in the next
02:33lesson, Managing an External Data Connection.
02:36When you are done, click OK to bring the data into Excel.
02:40When you work with colleagues who, for whatever reason, can't send you their
02:42data in an Excel workbook, always ask for a Comma Separated Value file.
02:46They are the easiest external files to import into your worksheets.
Collapse this transcript
Connecting to an external data source
00:01When you import data into Excel 2007, you don't just copy the data once and then
00:05lose the connection to the original file.
00:07Instead, Excel creates a data connection to the source file and if you tell it
00:11to do so, checks the file to see if its contents have changed, and your
00:15worksheet needs to be updated.
00:17You get to control how Excel updates your worksheet data by displaying the
00:20External Data Range Properties dialog box, but first I would like to show you
00:25what happens when you open a workbook that contains a link to an external file.
00:29To do that I will click the Office button and open ManageLinks, which is the
00:35file that I want to use.
00:38You will notice that when I open the file, a Security Warning appeared and that
00:41is that Data connections have been disabled.
00:45Excel 2007 and Office 2007 as a whole paid a lot more attention to security
00:50settings, because links to external files can present problems, such as through
00:54viruses or Trojan Horses, anything along those lines.
00:58Then Excel, based on your Security Settings, indicates that data
01:02connections have been disabled.
01:04If you want to re-enable this connection, you can click the Options button and
01:08then in the dialog box that appears, verify that the file path is correct and
01:13then click Enable this content.
01:15When you click OK, the warning goes away and you can work with your data normally.
01:20To manage with the Connection Properties of an existing data connection,
01:23you click any cell in the imported data and then on the Data tab of the
01:27ribbon, click Properties.
01:30The External Data Range Properties dialog box provides controls you can use to
01:34determine how and when Excel updates your workbook's contents by checking the
01:37source file for changes.
01:39The default settings Save the Query Definition, which maintains the link to the
01:42file, asks you for the name of the file you want to check for changes, preserves
01:47any formatting present in the source file, adjust the width of the columns in
01:50your worksheet to display all the imported values and insert cells for new data
01:55and delete unused cells if the number of rows in the source file changes.
01:58I want to maintain my data connection for the rest of this exercise, so I won't
02:02show you exactly what happens when the Save Query Definition check box is
02:06cleared, but what would happen is Excel would remove the connection to the
02:10external data file which has good news and bad news.
02:13The good news is that you wouldn't have to wait for Excel to update your
02:15workbook's contents if the external data file had changed, but the bad news is
02:20that any updates to the source file wouldn't appear in your workbook.
02:23If there is a possibility that the source file from which you are drawing
02:26external data could change, always leave the Save Query Definition check box selected.
02:31Now I would like to describe how some of the other settings in the dialog box work.
02:35For example right now, I have selected the Prompt for file name on refresh check box.
02:41Whenever you refresh a data connection with the Prompt for file name on refresh
02:45check box selected, Excel will display a dialog box asking you which file you
02:49want to draw the data from.
02:51One case where you might want to do that is if you have a worksheet that
02:53displays the current week's payroll information.
02:56If the name of the file could change, such as from week1.csv to week2.csv and so on,
03:01 then you should have the Prompt for file name checkbox selected.
03:04If the file name will always be the same then you can clear that box and
03:08save yourself a step.
03:10If there is a possibility that your source file will update continuously or at
03:14least very often, then you can have Excel look for changes in the source file
03:18at regular intervals.
03:19To do that check the Refresh every box and then you can use the Spin control
03:24to either type in or select a value that tells Excel how many minutes
03:27it should go between refreshes.
03:30You can also have Excel check the source file for changes whenever you open your workbook.
03:34To do that, check the Refresh data when opening the file box.
03:38If you want Excel to remove the imported data that was already in the workbook
03:41whenever you close the workbook, make sure you check the Remove external data box
03:45that activates after you check the Refresh data when opening the file box.
03:50The three inactive boxes under Data formatting and layout only become available
03:54when you bring in data from a database.
03:56The Include field names box is checked by default and it's the only one of the
04:00three options you really need to select.
04:02Excel worksheets have their own row numbers and you can sort and filter the
04:05data in Excel, so you don't need the other two options selected to work with
04:09your data effectively.
04:11Now I'll refer to the final set of controls down here.
04:14If it's possible that the number of rows in the source document could change,
04:17I always select the first option, which is Insert cells for new data and
04:21delete unused cells.
04:22That's also the default selection.
04:25The other two options can lead to errors by overwriting cells or rows.
04:29The first option is simpler and less prone to error if your hard disk doesn't
04:32spin quickly enough to keep up with the changes.
04:35Finally, if you have formulas in the column to the right of the last column of
04:38imported data, you should select the final checkbox to have Excel create those
04:42formulas next to every cell that contains data.
04:45Excel 2007 maintains data connections to your external files, so you don't have
04:49to rerun the Text Import Wizard every time you want to update your worksheet
04:52with new data from outside sources.
Collapse this transcript
Cleaning up data imported into Excel
00:01After you bring your data into Excel, you will need to ensure that you can use
00:04it for mail mergers or other operations.
00:08To do so, you will need to get rid of extra characters and to make sure the
00:10words are properly capitalized.
00:13It can be a bit of a drag but Excel has a number of built-in functions that you
00:16can use to clean up your data.
00:18The first step I go through when I clean up imported data is to get rid of any
00:21characters that don't usually appear in an address.
00:24I will allow periods which often appear in street abbreviations and names and
00:28the number sign, which some folks use to indicate apartments or post office boxes,
00:32but I definitely want to get rid of commas.
00:35Commas are useful when you write out an address by hand but I don't want them in my data file.
00:39I want to place the commas myself in the letter that I use as a target for my mail merge.
00:44To get rid of any commas in this data set, I will use the Find and Replace function.
00:49To display the Replace page of the Find and Replace dialog box, you can
00:53display the Home tab of the ribbon and then in the Editing group click Find
00:59and Select and click Replace.
01:03On the Replace page of the Find and Replace dialog box, you type the character
01:07you want to get rid of in the Find what box.
01:10In this case, that would be the comma.
01:12I will leave the Replace with box blank, so Excel deletes the character.
01:16In other words, I am replacing the comma with nothing.
01:20When I click Replace All, Excel displays a confirmation message.
01:24I can click OK and you see that the commas have disappeared from the data set.
01:30I am done with my Find and Replace, so I will click Close.
01:34In addition to Find and Replace, there are three functions you can use to
01:37prepare you data, Clean, Trim and Proper.
01:41The Clean function removes any unprintable or otherwise invisible
01:45characters from your data.
01:46You don't run into these characters much anymore but they were very common when
01:50you brought data from mainframe systems into early versions of Excel.
01:53For example, in some early word processors the character sequence Ctrl+H
01:58represented one press of the Backspace key.
02:00The Clean function gets rid of all those characters so they don't sneak up on
02:03you when you work with your data as a string in Excel and as an example, there
02:07is one of the invisible characters right there.
02:10The Trim function removes extra spaces from a text string, leaving a single
02:14space between each word.
02:16The Trim function is particularly useful when you scan a paper document
02:19into your computer.
02:20Some typist still put two spaces after a period, but the more common style for
02:24electronic documents is to have a single space.
02:27Finally, the Proper function capitalizes the first character of each word.
02:31Some folks type in all capital letters and others don't use capitals at all but
02:35the Proper function changes the text so the first letter's always capitalized.
02:40You will need to verify that the first letter and only the first letter
02:42should be capitalized for each person's name but if your data has a lot of
02:46transgressions against proper capitalization, you will save time by using the Proper function.
02:51So here's how I implement them.
02:53I like to combine the three functions into a single formula such as =PROPER
03:00and then nesting the functions I put TRIM and then another left parenthesis
03:07then CLEAN and then the address of the cell that contains the data I want to transform.
03:14So in this case that is cell A2, which is my address.
03:18To the left. That's not my real address.
03:21Type a right parenthesis, type a right parenthesis again.
03:25Type a final right parenthesis to close all of the functions.
03:27You will notice that when I created the Clean function in the middle of my
03:33formula, Excel displayed the left parenthesis that opens the function
03:37arguments in purple.
03:39When I closed it, it also displayed the right parenthesis in purple.
03:43So, I know that those two parentheses are a match.
03:46After Trim, I have a green left parenthesis and the right parenthesis that
03:50matches it is over here and finally when I created Proper, which was my
03:54outermost, my first function, there is a left parenthesis in black and the right
04:00parenthesis in black appears here at the end of the formula.
04:05The first and last parenthesis in your formula should always be black.
04:09That is the default color that Excel uses for the outermost function.
04:13When the colors match you are ready to go.
04:16So, when I press Enter, Excel displays my address.
04:20Now notice that everything worked.
04:22Excel got rid of my extra spaces, which were the only mistakes that I made in
04:26this particular address, but note that Excel made two changes I am going to have to undo.
04:30The first was to change North-West, NW both capitals to N lowercase w and changed
04:37DC to D lowercase c. So, I will need to go and clean that up later.
04:42Here's my formula but note that because I used a relative reference for cell A2,
04:48when I copy the formula down to cells B2 and B3, Excel will update the formula
04:53so that it affects the cells to the left A3 and A4.
04:57So, when I do that, Excel updates the formulas and it works with my data.
05:03Now that I have the corrected text in column B, I can delete the original
05:06incorrect data in column A and use the cleaned up data in my tasks.
Collapse this transcript
Creating data validation rules
00:01Your calculations are only as good as the data in your worksheets.
00:04You can't do a lot to control the data you get from outside sources, but you can
00:07help your staff enter data correctly by creating Data Validation rules.
00:12To create a Data Validation rule, you select the cell or cells into which you
00:15want to put the rules and then on the Data tab of the Ribbon in the Data Tools
00:20group, click the body of the Data Validation.
00:24When you do, the Data Validation dialog box appears.
00:28You can use the controls in the Data Validation dialog box to define your rules.
00:32To display the rules that you can create click the Allow box's down arrow.
00:37The Any value option essentially turns off any validation, but the other types
00:41of rules that you can create require the user to enter a whole number, decimal
00:44number, value from a predefined list, date, time, text of a particular length,
00:49or a value that meets a custom rule you've defined.
00:52In this lesson, I'll show you how to create a rule for a whole number value, and
00:56for text of a particular length.
00:58In the next lesson, I'll show you how to require a user to enter a value from
01:01the predefined list.
01:03To require a user to enter a whole number value, click the Allow box's down
01:07arrow, and then click Whole number.
01:10When you do, the Data box updates to display the types of rules that you can
01:13create, between, less than, greater than and so on.
01:18In this case I want to require the user to enter a value between 1 and 100, so
01:22I'll leave the rule type as between.
01:25Now I can either type the values I want in the Minimum and Maximum boxes or
01:29I can create formulas that define these values.
01:31For example, if I had a daily order limit in cell G1, I could type the formula
01:37=G1 in the Maximum box to set that cell's value as the maximum.
01:41In this case, I want the minimum to be 1, which I'll type in the Minimum box and
01:46the Maximum to be 100, which I will type in the Maximum box.
01:50When you set a Data Validation rule, you can require the user to enter a
01:53value into the cell.
01:55To do that you uncheck the Ignore blank checkbox.
02:00If you'll leave that box checked, the user can skip entering a value into the cell.
02:04If you want to require a value, always uncheck that box.
02:09After you've defined the rule you should provide some information for your users.
02:13Clicking the Input Message tab allows you to display a message box when the cell
02:17is selected, but the user has to click OK to clear the Input Message box before
02:21entering any values.
02:22I personally find the Input Message box to be more trouble than it's worth.
02:25So I never create them.
02:27What I do create are error alerts, which you can define by clicking the Error Alert tab.
02:32An error alert let's the user know that they have made a mistake, and if you
02:36create a message for them and leave the Show error alert checkbox selected,
02:40it lets them know what sort of data is accepted in the cell.
02:44You can create three types of alerts, Information, Warning, and Stop.
02:50An Information alert lets the user know the data is incorrect, but lets
02:53them enter it anyway.
02:55A Warning alert lets them know the data incorrect and highlights the cell, but
02:59allows the user to ignore the alert, and press Enter or Tab to keep the value.
03:03A Stop alert display error message and prevents the user from entering
03:06the incorrect value.
03:08So I will create a stop warning, because I prefer not to allow the data to be
03:13entered if it's incorrect.
03:15After you define your error style, you can create a custom error message to
03:19display to your users when they enter an incorrect value.
03:22It's best to keep the message positive and tell them what values are acceptable.
03:26In this case the title might be Value Outside Acceptable Range, and the error
03:32message itself could read, Cells in this column must contain the values between 1 and 100.
03:42When I am happy with the error alert and the rest of the rule, I can click OK to create it.
03:46And now let me show you how it works.
03:49If I type an acceptable value into cell D2 where I created the rule such as 10,
03:55and I hit Return or press Tab, Excel accepts the value.
04:00If I were to type in a value of 200 Excel would display the error alert,
04:06indicating that the value is outside the acceptable range and display my message.
04:10If I type Retry Excel allows me to enter another value.
04:14This time I'll make another error, 210, press Return, and I'll show you what
04:19happens if I click Cancel. Excel reverts the cell to its original value or if
04:24there was no value in the cell, it reset it to blank.
04:27One neat thing about Excel tables is that if you create a Data Validation rule
04:31for a cell in the table, Excel will apply the rule to the next cell in that column
04:35when you create a new table row.
04:37So for example when I pressed Enter to accept the data earlier, Excel created a
04:41new table row and applied the Data Validation rule to this cell.
04:46If I were to type in 100, which is an acceptable value, and press Return,
04:50Excel allows the entry.
04:51If I were to add 200, Excel displays the error alert.
04:55If I click Cancel, it reverts to the original value.
05:00You can modify or delete Data Validation rules by selecting a cell that contains
05:03the rule and then on the Data tab of the Ribbon in the Data Tools group,
05:07clicking the Data Validation dialog box.
05:11If you want to modify the rule, you can change any of the settings including
05:14changing the type of rule, changing the data comparison, Minimum and Maximum.
05:19You can change any or all of it.
05:21If you want to turn off the Data Validation rule, you can click any value from
05:27the Allow list and then when you're done click OK.
05:30If you wanted to get rid of all of your Data Validation rules, you can click Clear All.
05:35When you click OK, Excel gets rid of the rule.
05:40Data Validation rules help reduce data entry errors, which are the bane of
05:43spreadsheet users everywhere.
05:45But be sure to add an explanatory error message that lets your user know what
05:49range of value is acceptable.
05:51That way they will understand why the value they tried to enter is incorrect.
Collapse this transcript
Using lists to limit values entered into a cell
00:00Data validation rules help limit the data your users can enter into a cell, but
00:05they can be frustrating if the rules aren't clear.
00:07One of the clearest ways to require your users to enter one of the set number of
00:11options is to define a list of acceptable values for a cell.
00:15To require a user to select a value from an existing list, display the Data tab of
00:19the ribbon after you click the cell where you want to add the rule and then in
00:23the Data Tools group, click the Data Validation button.
00:27Then in the Data Validation dialog box, click the Allow box's down arrow and select List.
00:35If you're willing to let the users skip entering a value in this field, you can
00:38leave the Ignore blank checkbox selected.
00:41However, if you want to require them to enter a value you should clear it.
00:46The other option you can select is whether to have an in-cell dropdown list.
00:50I always make a dropdown list available to save the user the time it takes to
00:53type in the value and to prevent them from becoming frustrated if they can't
00:57remember the value they want or if they make a typing error.
00:59So I will leave this checkbox selected.
01:03Now that you have made your other selections, you can define a list of values
01:06that you'll allow in the cell.
01:08You can click the RefEdit button at the right side of the Source box and then
01:13select the cells that contain your list.
01:14In this case, those are in G1 through G5.
01:18I will click the RefEdit control again.
01:22I can verify that the proper cells G1 through G5 appear in the Source box.
01:28Rather than selecting a group of cells, I can also type in the name of a regular
01:32or dynamic named range.
01:35The advantage of using a named range is that you don't have to be on the same
01:38worksheet as the cell for your users entering the data and if it's a dynamic
01:42named range you can add or remove values as your needs change.
01:46I also always add a Stop Error message to my list data validation rules with a
01:51message that reads something like, Please select a value by clicking the down
01:54arrow at the right edge of the cell.
01:56This message is non-confrontational and lets the user know what they have to
01:59do to enter value into the cell, but it also prevents them from typing in an arbitrary value.
02:04So now I have my List here. I can click OK to create the rule.
02:10And now when I click the Down Arrow at the right side of the cell I can select
02:14the category that I want without any possibility of a miscue.
02:18So if I click Engine that value appears in cell C2.
02:23Data validation lists are powerful rules that help prevent spelling errors and
02:26limit your users data entry to a list of approved values.
02:29That way you get the data you expect.
02:32Be sure to listen to your users though to find out if you need to add or edit
02:36items on the list to reflect their needs and the realities of your business.
Collapse this transcript
5. Auditing Worksheet Formulas
Managing Excel formula error indicators
00:01If you create a lot of worksheets, it's inevitable that you will create formulas
00:04that don't do what you want them to do.
00:06Excel helps you discover those errors, but sometimes it can be a
00:09little overenthusiastic.
00:11In this lesson, I'll show you how to control the ways in which Excel
00:14displays error messages.
00:16Excel indicates formula errors in two ways.
00:19The first is by displaying an error message, such as the one here in Cell
00:22B7, which is DIV/0.
00:26In those cases, your formula produces a definite error that prevents Excel from
00:29calculating the formula's result.
00:31In other cases such, as the one shown here in Cell G3, Excel displays an error
00:37flag at the top left corner of the cell to indicate the cell contains something
00:40that might be an error but might not.
00:43If you see a flag at the top left corner of a cell and I'll click away just so
00:47you can see it more clearly here at the top left corner.
00:51You can click the cell and then hover your mouse pointer over the error
00:55indicator to the side, click it and see which error Excel thinks you committed.
01:00In this case, Excel points out that your formula omits adjacent cells.
01:04So if you look at the formula you'll see that it finds the sum of cells E3
01:08through E5, which are these three cells here.
01:13That is the result you wanted, so that means this error indication is
01:16actually inaccurate.
01:18But what can you do about it?
01:20You can identify whether the behavior Excel flag is a real error or whether
01:24you should ignore it.
01:25You can control the type of error Excel flags by changing the program's
01:28error checking rules.
01:30To do that you click the Office button, click Excel Options and display the
01:36Formulas tab. Halfway down the page you'll see the Error Checking section.
01:41Clearing the Enable background error checking checkbox turns off all the error indicators.
01:47But you can also select which rules to enable or disable by checking the boxes
01:51in the Error checking rules section.
01:53You can read through the rules yourself, but I always turn off three rules and
01:57those are Formulas inconsistent with other formulas in the region, Formulas
02:02which omits cells in a region and Formulas referring to empty cells.
02:08Corporate finance worksheets almost always pick and choose data from larger lists.
02:11So the formulas which omits cells in a region rule tends to identify cells that
02:15don't actually contain errors.
02:17Also, because corporate worksheets often have different values in adjacent
02:20cells to save space, the formulas inconsistent with other formulas in the region
02:24notation is annoying, not a help.
02:27Finally, there will be times when I haven't entered a value into a cell, but
02:30still want to include the cell in my formula.
02:32So I don't want to activate the Formulas referring to empty cells error, which
02:36is turned off by default.
02:37There are two other aspects of error checking you can change.
02:41If you'd prefer to have Excel use another color to identify cells that contain
02:44errors click the Indicate errors using this color button and then select the
02:48color you want Excel to apply.
02:50Also if you'd like to set the Error checking rules to the default settings,
02:54you can click the Reset Ignored Errors button.
02:57Background error checking provides useful information, often enough for me
03:00to leave it turned on.
03:01But you should always review which error is Excel flags and turn off the ones
03:04that provide no useful information.
Collapse this transcript
Identifying and tracing errors
00:01If you inherit a workbook that contains a lot of errors, you don't have to move
00:04from cell-to-cell by hand.
00:05Instead you can speed the process along, by using the controls in the Error
00:09Checking dialog box.
00:11To display the Error Checking dialog box, click the Formulas tab of the ribbon
00:15and then in the Formula Auditing group click the Error Checking button.
00:20The Error Checking dialog box is a lot like the spelling checker and that it
00:23identifies individual errors within your worksheet, provides a links to tools
00:27you can use to fix the problem, and lets you move from error-to-error by
00:30clicking the Previous and Next buttons.
00:33Clicking the Help on this error button displays a help file describing what can
00:37cause the error and how to fix it.
00:39The information is more complete than the brief notice here on the left side of the dialog box.
00:44Clicking the Show Calculation Steps button opens the formula in Evaluate Formula
00:48dialog box, which I'll describe how to use in the Evaluate Formulas Step-by-step lesson
00:54found later in this chapter.
00:57If you click the Ignore Error button, Excel will not highlight the current error
01:00when you use the Error Checking dialog box.
01:03If the cell does contain an error and you want Excel to highlight it, you'll
01:06need to delete the existing formula and recreate the formula in the cell.
01:10Next, clicking the Edit in Formula Bar button opens the cell for editing and
01:15moves your cursor to the Formula Bar.
01:17If you want to move back to the Error Checking dialog box, click Resume.
01:21Finally, clicking the Options button displays the Formula page of the Excel
01:25Options dialog box, where you can control how Excel highlights errors in your worksheet.
01:30To move back to the Error Checking dialog box, click Resume.
01:35One other error checking capability you might find to be useful is the
01:38Trace Errors feature.
01:40If you want to identify the cells that provide values to a cell the contains a
01:43formula error, click the cell that contains the error and then on the Formulas
01:47tab of the ribbon, in the Formula Auditing group, click the Error Checking
01:51button's down arrow and click Trace Error.
01:55When you do, Excel creates tracer errors identifying the cells that provide
01:59values to the formula.
02:00You can control these errors using the techniques that I will teach you later
02:03in this chapter in the Tracking Formula precedents independence lesson.
02:07The Error Checking dialog box is a powerful tool that comes into its own, if you
02:11have to analyze a workbook that contains a large number of errors.
02:14You should move through the worksheet using the Previous and Next buttons before
02:17you start editing any individual formulas though.
02:20You might find that a single formula error is causing other errors in your worksheet.
Collapse this transcript
Tracing formula precedents and dependents
00:01Excel includes a number of very useful tools you can use to ensure your formulas
00:04use the proper values.
00:06One of those tools gives you the ability to determine which cells are used in
00:09which worksheet formulas.
00:12Cells can play two roles in the formula: as a precedent or dependent.
00:16A precedent provides its value to another cell.
00:18A dependent draws its values from another cell.
00:22Displaying a cell's precedents indicate which other cells provide the formula as input.
00:25For example, here in cell D3, I've a formula that calculates the number of
00:29people who came to library within a year.
00:32If I want to display that formula's precedents, in other words to indicate which
00:35cells provide values to the formula, I can click the cell and then on the
00:39Formulas tab the Ribbon in the Formula Auditing group click Trace Precedents.
00:44When I do, Excel outlines the cells that provide their values to the formula,
00:49and then draws an arrow to that cell indicating that those cells provide their values.
00:54If you want to clear the arrow, you can click Remove Arrows in the Formal
00:58Auditing group on the Formulas tab of the Ribbon.
01:01Displaying a cell's dependents shows which other cells use the selected
01:05cell's value as an input.
01:06So let's say here that I wanted to see which other cells use Sum of Visitors as an input.
01:12To indicate that I would click the cell and then in the Formula Auditing group
01:17on the Formulas tab click Trace Dependents.
01:21When I do you see that the formulas in both cells D6 and D9 use the value in
01:26cell D3 as part of their calculation.
01:29And again to get rid of the arrows, you can click Remove Arrows.
01:34If you have both precedent and dependent buttons in a worksheet at the same time
01:38and you want to get rid of all of them, you can click the Remove Arrows' down arrow
01:43and click Remove Arrows, which removes everything.
01:46If you only want to remove the precedent arrows or the dependent arrows you can
01:50click that options as well.
01:53Tracer arrows can also indicate that a formula draws its value from a cell
01:56on another worksheet.
01:57So for example, let's take a look at the formula here in cell D9.
02:02We already know that it draws one value from the cell D3,
02:05but let's see where else it draws its values from.
02:07To do that I will click Trace Precedents to indicate which cells provide their
02:11values to this formula.
02:13When I do, you see the indicator that tells us that Excel draws its value from
02:17cell D3, but it also draws its value from a cell on another worksheet.
02:22That is what this indicator here means.
02:25A black line drawn to what looks like a worksheet grid.
02:28If you want to display the other worksheet or workbook that provides the value,
02:33you can click this line and you will know you're in the right place when your
02:37mouse pointer changes from the white cross to a pointing arrow, and
02:42you double-click, Excel displays the Go To dialog box.
02:47You can click the item in the Go to box and click OK.
02:51When you do, Excel displays the workbook or worksheet that contains the other
02:55values used in the formula.
02:57Identifying a cell's precedents and dependents will help you discover and
02:59correct many formula inaccuracies.
Collapse this transcript
Evaluating Excel formulas step by step
00:01Sometimes you'll look over a formula, verify that it uses its proper inputs,
00:04and still find that the formula returns an incorrect result.
00:08If that's the case, you can move through the formula one calculation at a time
00:11to identify the problem.
00:13In this case, I've setup a formula that tries to find the average revenue per sale.
00:18But I'm getting a #DIV/0! error.
00:21This is a simple example, but I'd like to show you how to step through formula
00:24one step at a time so that you can evaluate it step by step.
00:28So in this case I will click the cell that contains the formula with the error,
00:32which is in cell B7.
00:34Then on the Formulas tab of the Ribbon in the Formula Auditing group,
00:38I'll click Evaluate Formula.
00:39When I do, Excel displays the formula as written, B3/B4.
00:45I can now evaluate the formula by clicking Evaluate.
00:49When I do, Excel brings in the first value or resolves the first argument
00:53here in the formula.
00:55So it's 250,000, which is correct, and I can click Evaluate to move to the next step.
01:01When I do, Excel displays 0 and I know that's an error because you can't
01:05divide by zero, and also it corresponds to the error that's displayed in the
01:09body of the worksheet in cell B7.
01:11I have located the error, I can click Close and edit the formula.
01:17The formula actually appears to be correct.
01:19I am finding the Average per Sale and to do that I'll divide Sales Revenue by
01:24Sales Count, but I see the source of the error and that's that the Sales
01:27Count cell is blank.
01:30I happen to know that the number of sales was 215.
01:33So I'll type that in.
01:35When I press Enter, I'd rather have that cell displayed using the Accounting format.
01:41So I'll click that on the Home tab and display the result.
01:45Evaluating Excel formulas is a powerful technique you can use to verify that a
01:49formula produces the correct result.
01:51You can also use formula evaluation to understand how a formula's logic works.
01:55If you encounter a formula that uses a function you haven't used before,
01:59you should take the time to look up the function in the Excel Help files and step
02:02through the formula, so you'll have a better idea of why the formula is in the
02:06workbook and how it derives its result.
Collapse this transcript
Watching cell values
00:00Many worksheets have formulas that draw their values from cells on other worksheets.
00:05If you change the formula's inputs, you need to display the other worksheet to
00:08see how the new input affects the formula's value.
00:11You can speed the process up by creating a Watch, which displays the target
00:14cell's value in a dialog box.
00:17To set a Watch on a cell, click the cell, in this case cell D9, and then on
00:23the Formulas tab of the Ribbon, in the Formula Auditing group, click the Watch Window button.
00:28When you do, Excel displays the Watch Window.
00:31To create your watch, click Add Watch and now you can select the cell that you
00:35would like to watch the value of.
00:37I have already selected cell D9 on Sheet1, which appears in the dialog box.
00:41So I can click Add.
00:44When I do the value and the formula appear in the Watch Window.
00:48Now this cell draws a value from Sheet2 cell B1.
00:52So, let's see what happens when I change the value on that cell.
00:56Click Sheet2 and you see the value here in cell B1.
00:59Notice that the Watch Window stayed active. It didn't go away.
01:03So, now I'll change the value in B1 to something much higher. Let's call it 100.
01:08When I press Return, Excel updates the result of the formula, but you don't
01:12have to flip back to Sheet1 to see the change. Instead it's displayed here in the Watch Window.
01:19You can remove a Watch by clicking the Watch within the body of the Watch Window
01:23and then clicking the Delete Watch button and closing the Watch Window.
01:27Watching cell values provides an excellent solution for times when you want to
01:31make multiple changes to a cell's value, but don't want to flip to another
01:34worksheet after each change.
01:36You'll save time and get the information that you need to make your
01:38analysis more accurate.
Collapse this transcript
6. Performing What-If Analysis
Creating scenarios and applying them to an Excel worksheet
00:01Excel enables you to analyze your data effectively.
00:03One little known but very useful tool is the scenario.
00:07The scenario is an alternative dataset you can use to perform What-If
00:10analysis on your worksheet.
00:12To define a scenario, you click the Data tab on the ribbon and then in the Data
00:17Tools group, click What-If Analysis and then click Scenario Manager.
00:22In the Scenario Manager dialog box, click Add to begin creating your scenario.
00:28First thing you should do is type in a scenario name, and for this exercise,
00:33I will call it LoanPossibilities.
00:37Next you select which cells you want to change.
00:40You can either type the addresses of the cells in the changing cells box, or
00:44click the RefEdit control at the right edge of the box and select the cells
00:47you want to change.
00:48For example, if I wanted to change cells B3 and B4, I can click here in the
00:54Changing cells box, and then select B3 and B4, and those references appear here.
01:02If I wanted to type the values in, I could type in B3, B4.
01:08In either case, the result will be the same.
01:11Leaving the Prevent changes checkbox selected prevents other users from altering
01:15the cells for which you've defined scenarios.
01:18Also, if you don't want other users to see the cells you've changed,
01:21you can check the Hide box.
01:23I've never used that option, but it's there if you want it.
01:26After you've set all of your options, click OK.
01:30After you click OK, the Scenario Values dialog box appears with a box for each
01:34cell you wanted to change.
01:36You can type an alternative value in the boxes and then click OK to accept the changes,
01:40and close the Scenario Manager or click Add to accept the changes, and
01:44create another scenario.
01:46In this case, I'll just click OK after I enter in the values.
01:50So let's say that I have a loan amount of $1 million instead of $15 million and
01:56a term of 5 years instead of 10 years.
01:59That's the only thing that I want to create. So, I'll click OK.
02:01After you create a scenario, it appears in the Scenarios list of the Scenario Manager.
02:07To apply the scenario, click the scenario so it's highlighted, and then click Show.
02:13If you want to apply another scenario, click it and then click OK.
02:17If the second scenario affects any of the same cells as the first scenario,
02:20the second scenario's values will take precedence.
02:23Now, this is important.
02:25Note that there is no Hide button in the Scenario Manager.
02:29After you apply a scenario, the only way to get rid of it is to click the Undo
02:33button or press Ctrl+Z. So if I close the dialog box, I get the Undo button back.
02:40When I click it, Excel restores the values to their original state.
02:44One word of caution about scenarios. If you apply a scenario and then save
02:49and close a workbook, Excel overwrites the workbook's original data with the scenario data.
02:54What that means is that you should always make backup copies of any workbooks to
02:57which you plan to apply scenarios, just in case you change your data and forget
03:01to close the workbook without saving your changes.
Collapse this transcript
Editing, deleting, and summarizing scenarios
00:01After you create one or more scenarios, you can edit, delete, and summarize them.
00:05To do any of those things, you need to display the Scenario Manager dialog box.
00:10To do that, click the Data tab on the ribbon and then in the Data Tools group,
00:15click What-If Analysis and click Scenario Manager.
00:19When you do, the Scenario Manager dialog box appears with your scenarios listed
00:23in the Scenarios list.
00:25If you want to edit a scenario, you can click it, and then click the Edit button.
00:31When you do, you get the Edit Scenario dialog box.
00:34If you want to change the cells that the scenario applies to, you can edit the
00:37reference in the Changing cells box, either by typing in the new reference or by
00:42clicking the RefEdit button.
00:44When you're done there, you can click OK and you can enter in new values for the scenario.
00:50So in this case, cell B5, the high interest rate that I put in, was 0.07.
00:54That might be a little bit too high.
00:55So I will change it to .0625.
01:00When I'm done adding values, I can click OK and Excel takes me back to the main
01:05Scenario Manager screen.
01:06If I want to summarize my scenarios, in other words, if I want to see a single
01:10listing of the way that each scenario changes my values, I can click Summary.
01:16Then select the type of summary that I want to create.
01:18In this case, I want to create a simple scenario summary rather than
01:22a PivotTable report.
01:24My result cells that I want to include in the summary are B7.
01:28Excel notices that B7 contains a formula that uses the cells that I've changed.
01:32So it guesses that I want to include B7 in the scenario. That's correct.
01:36So I can click OK.
01:38When I do, Excel creates a new worksheet that summarizes all the scenarios for
01:43the active worksheet.
01:44So you see that I have my Current Values for the Changing Cells, 5.75%.
01:49That's the base value.
01:50Then I have the LowInterest scenario of 5% and HighInterest scenario of 6.25%.
01:56You also see the results for the calculations given in each of those scenarios.
02:00I have the Result Cell under normal conditions, for the LowInterest scenario
02:04and for the HighInterest scenario.
02:06So now if I go back to the worksheet where I created my scenarios, Sheet1, and
02:13display the Scenario Manager, I can delete one of those scenarios.
02:17So, for example, if I wanted to delete the HighInterest scenario, I could click it,
02:21click Delete, and Excel gets rid of this scenario.
02:25Notice it did not ask if you really wanted to do it.
02:28It does not verify that you want to get rid of it.
02:31If you click Delete, the scenario is gone.
02:34When you're ready to close the Scenario Manager dialog box, click Close.
02:39I wholeheartedly recommend that you create a summary worksheet whenever you
02:42create a series of scenarios.
02:44Even if you do save a workbook with scenarios still applied, the cell's original
02:47values will appear on the Summary worksheet.
Collapse this transcript
Creating a single-input data table
00:01One common data analysis scenario is for you to know certain parameters of the
00:04transaction, such as the amount of a loan and the amount of time you would like
00:07to pay it back, but to have one element be unknown.
00:11When businesses shop for a loan, the unknown variable is most often the interest rate.
00:15If you would like to determine the effect of varying interest rates in your loan,
00:18you can create what is called a data table.
00:21To create a single input data table, you need to lay your data out in a
00:24configuration similar to the one shown here, in this worksheet.
00:28I am analyzing the effect of interest rates on the monthly payments on a loan of
00:31$15 million to be paid back over 15 years.
00:34I have put the loan parameters in cells B2 through B5 and calculated the monthly
00:41payment for an interest rate of 6.25%, which I have in cell D2.
00:47I then added the other interest rates I would like to examine in cells C3 through C6.
00:54To create this data table, I will select cells C2 through D6, which I
00:58outlined in the worksheet.
01:00That range defines a rectangle, which contains the cells with the values I want
01:04to examine and also the cells where I want to paste the results.
01:07After I make my selection, I can click the Data tab in the ribbon and then in
01:12the Data Tools group click What-if Analysis and then click Data Table.
01:18When I do, the Data Table dialog box appears.
01:21The cells that contain the values I want use to create the table are laid down
01:24on a column, so I'll type a value in the Column Input Cell box.
01:28The cell I want to vary is B3 up here, which contains the interest rate.
01:33So, I will type B3 in the Column Input Cell box and then when I click OK,
01:38Excel creates the data table.
01:41The values that appear in cells D3 to D6 represent the monthly payments for this
01:45loan at Interest Rates of 5.75, 6, 6.25 and 6.5%.
01:51Creating a data table helps you analyze a number of different data inputs quickly.
01:56In the next lesson, I will show you how to create a data table using two inputs.
Collapse this transcript
Creating a double-input data table
00:00In the previous lesson, I showed you how to create a data table based on
00:03one variable input.
00:05In this lesson, I'll show you how to create a two input data table.
00:09To create a two input data table, you lay out your worksheet like the one shown here.
00:13The known or assumed parameters are here in the two columns on the left or I
00:17have the Down Payment and then also the Loan Parameters.
00:22The variables appear here, on the right, where I have the Interest Rates listed
00:27here in C3 through C6 and then also the number of years or the term over which
00:32I would like to pay back the loan.
00:33Those values are 10, 12 and 15.
00:37The formula in cell C2 calculates monthly payments given these parameters.
00:42The cells of a body of this cross table will calculate monthly payments for
00:46a combination of values.
00:47So for example, 10 years at a rate of 5.75%, 12 years at a rate of 6.25% and so on.
00:54To create the data table, I will select cells C2 through F6, which I outlined
00:59here in the worksheet, and then on the Data tab of the ribbon in the Data Tools group,
01:03click What-if Analysis and then click Data Table.
01:08You are creating a two input data table, so you need to put cell references in
01:12both the Row input cell and Column input cell boxes.
01:15The row input cell, which contains the original loan term, is cell B4.
01:19So, I will type that in the Row input cell.
01:22The column input cell, which contains the original Interest Rate, is cell B3.
01:26So, I will type that in the Column input cell box.
01:30When you click OK, Excel creates the data table.
01:33I resize the columns by double-clicking the right edge of the column header at
01:37the top of the worksheet.
01:38So you can see that at a rate of 5.75% over 10 years, you would be paying
01:44over $164,000 a month.
01:46If you stretch that out to 15 years, your monthly payment would only be
01:50$124,000 and change.
01:52The downside of course is that the longer you pay, the more interest you pay.
01:55So, the total cost of the loan would be higher.
01:58Data tables are a powerful, but little used Excel tool.
02:01If you find you need to analyze a transaction that depends on one or two
02:04variable inputs, creating a data table is much faster than creating the
02:07formulas by hand.
Collapse this transcript
Finding target values using Goal Seek
00:01In many cases, you'll know the parameters of a financial transaction such as the
00:04interest rate and term on a loan.
00:06So the only other input you need to calculate your monthly payment is the loan amount.
00:10If you have a target monthly payment you don't want to exceed, you can determine
00:14the maximum amount you can borrow using Goal Seek.
00:17I have set up this worksheet to reflect the terms of a loan.
00:20The desired loan amount is $15,000,000 the term is 10 years and the interest
00:24rate is definitely 5.75%.
00:27The monthly payment of these terms is here in cell B7.
00:30But your company wants to pay a maximum of $125,000 a month.
00:34If you want to determine how much money you can borrow with a payment of at most
00:37125,000 dollars, you can use Goal Seek.
00:41To display the Goal Seek dialog box, you click the Data tab on the ribbon and
00:46then in the Data Tools group, click What -if Analysis and then click Goal Seek.
00:51In the Goal Seek dialog box, you can define three different values.
00:55The first is the cell that you want to change.
00:57Our target payment is $125,000 a month.
01:02The payment is calculated in cell B7.
01:03So, that is the cell that we want to vary.
01:06I'll click B7, and the cell reference appears in the Set cell box.
01:10Now I can type in the value to which I want to change it.
01:13In this case, my target payment is $125,000 but I can't use a cell reference.
01:18There is no RefEdit box here at the right side so I need to type the value in directly.
01:23The final box, the By changing cell box, asks which cell you want to vary to
01:28produce the result that you want.
01:30In this case, that is cell B3, the Loan Amount, which is the controlling factor
01:34of the monthly payment if these two arguments, the term and interest rate, stay constant.
01:38I click cell B3.
01:41It appears in the By changing cell box and I click OK.
01:45When I do, Excel displays the Goal Seek Status dialog box, which tells me
01:50that it did find a solution and I see that solution here in the body of the worksheet.
01:54Basically, if my company wants to pay $125,000 a month at most over 10 years at
02:00an interest rate of 5.75% then it can borrow about $11.4 million.
02:06If I click Cancel, Excel returns the worksheet to its original state.
02:09If however I click OK, Excel retains the Goal Seek results.
02:14You can use some fairly advanced algebra to reverse engineer this sort of calculation,
02:18but it's much easier to let Goal Seek do the work for you.
Collapse this transcript
Conclusion
Goodbye
00:00Thanks a lot for taking the time to work through Excel 2007:
00:03Introduction to Formulas and Functions.
00:06I hope you have learned a lot and I hope that you can use the skills that
00:09you have learned to develop even more skills as you use Excel.
00:12Thanks again, and best of luck.
Collapse this transcript


Are you sure you want to delete this bookmark?

cancel

Bookmark this Tutorial

Name

Description

{0} characters left

Tags

Separate tags with a space. Use quotes around multi-word tags. Suggested Tags:
loading
cancel

bookmark this course

{0} characters left Separate tags with a space. Use quotes around multi-word tags. Suggested Tags:
loading

Error:

go to playlists »

Create new playlist

name:
description:
save cancel

You must be a lynda.com member to watch this video.

Every course in the lynda.com library contains free videos that let you assess the quality of our tutorials before you subscribe—just click on the blue links to watch them. Become a member to access all 98,468 instructional videos.

start free trial learn more

If you are already an active lynda.com member, please log in to access the lynda.com library.

Get access to all lynda.com videos

You are currently signed into your admin account, which doesn't let you view lynda.com videos. For full access to the lynda.com library, log in through iplogin.lynda.com, or sign in through your organization's portal. You may also request a user account by calling 1 1 (888) 335-9632 or emailing us at cs@lynda.com.

Get access to all lynda.com videos

You are currently signed into your admin account, which doesn't let you view lynda.com videos. For full access to the lynda.com library, log in through iplogin.lynda.com, or sign in through your organization's portal. You may also request a user account by calling 1 1 (888) 335-9632 or emailing us at cs@lynda.com.

Access to lynda.com videos

Your organization has a limited access membership to the lynda.com library that allows access to only a specific, limited selection of courses.

You don't have access to this video.

You're logged in as an account administrator, but your membership is not active.

Contact a Training Solutions Advisor at 1 (888) 335-9632.

How to access this video.

If this course is one of your five classes, then your class currently isn't in session.

If you want to watch this video and it is not part of your class, upgrade your membership for unlimited access to the full library of 1,894 courses anytime, anywhere.

learn more upgrade

You can always watch the free content included in every course.

Questions? Call Customer Service at 1 1 (888) 335-9632 or email cs@lynda.com.

You don't have access to this video.

You're logged in as an account administrator, but your membership is no longer active. You can still access reports and account information.

To reactivate your account, contact a Training Solutions Advisor at 1 1 (888) 335-9632.

Need help accessing this video?

You can't access this video from your master administrator account.

Call Customer Service at 1 1 (888) 335-9632 or email cs@lynda.com for help accessing this video.


site feedback

Thanks for signing up.

We’ll send you a confirmation email shortly.


By signing up, you’ll receive about four emails per month, including

We’ll only use your email address to send you these mailings.

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

By signing up, you’ll receive about four emails per month, including

We’ll only use your email address to send you these mailings.

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked