Professional Documents
Culture Documents
M i c r o s o f t E xc e l
A dva n c e d
Course User Guide
Exploring Formulas
About Formulas................................................................................................................
Macros
Advanced Graphs
Advanced Charts
Customizing Charts
Customizing Graphs
Query Functions
Valid returns
When a nested function is used as an argument, it must return the same type of value that the argument
uses. For example, if the argument returns a TRUE or FALSE value, then the nested function must return
a TRUE or FALSE. If it doesn't, Microsoft Excel displays a #VALUE! error value.
A reference identifies a cell or a range of cells on a worksheet and tells Microsoft Excel where to look for
the values or data you want to use in a formula. With references, you can use data contained in different
parts of a worksheet in one formula or use the value from one cell in several formulas. You can also refer
to cells on other sheets in the same workbook, and to other workbooks. References to cells in other work-
books are called links.
The A1 Reference
By default, Excel uses the A1 reference style, which refers to columns with letters (A through IV, for a total
of 256 columns) and refers to rows with numbers (1 through 65536). These letters and numbers are
called row and column headings. To refer to a cell, enter the column letter followed by the row number.
For example, B2 refers to the cell at the intersection of column B and row 2.
To refer to Use
The cell in column A and row 10 A10
In the following example, the AVERAGE worksheet function calculates the average value for the range
B1:B10 on the worksheet named Marketing in the same workbook.
Note that the name of the worksheet and an exclamation point (!) precede the range reference.
Dates are stored in Excel as serial numbers starting with 1, which represents January 1, 1900. That's You cannot use dates before January
when the Excel calendar starts. Each day after that adds one number to the sequence. For example, 1, 1900, in Excel formulas.
January 2, 1900, is stored as 2.
If you typed 8/22/2005, Excel would store the date as 38586. Adding 38585 days to January 1, 1900,
gives August 22, 2005.
Storing dates as serial numbers makes it possible for Excel to do date arithmetic. To find the number of
days between two dates, for example, Excel subtracts one serial number from another.
Use a slash or a hyphen to separate the parts of a date in Excel. Excel recognizes information in that form
as a date and stores it as a serial number: 8/22/2005 and
22-Aug-2005 are both stored as serial number 38586. Excel
will also recognize August 22, 2005 as a date.
Excel can surprise you by changing dates that you've typed in
one format into its own default format. For example, if you
typed August 22, 2005, Excel might change the format to
22-Aug-05 or to another default format. Regardless of the
format, the date's serial number is 38586. Unless, that is,
you use a format that Excel doesn't recognize as a date.
For example, if you typed August 22 2005 or 8,22,05, Excel
would store that information as plain text, not as 38586.
In this practice session, you'll switch between date format and serial number format to get a better under-
standing of how Excel views dates. You'll also select different date formats by using the Format Cells dia-
log box and you can try something new: using a keyboard shortcut to insert the current date in a work-
sheet.
1. Open the Excel Advanced Training Folder (located on the desktop of the laptop)
3. Click on Open
1. Select cell A2
2. Click on Format
3. Click on Cells
5. In the Category list - Click on General (The Serial number value 38586 is displayed under Sam-
ple a the top of the dialog box.)
6. Click ok
1. Select cell A2
2. Click on Format
3. Click on Cells
7. Click ok
If you’d like to see the serial number values of other dates, type any date in an empty cell. Then repeat
the steps above to format the date as a serial number and back again as a date.
1. Select cell D5
The current date is inserted into the worksheet. The date is static, it will not update itself as time goes by.
To do arithmetic in Excel, you use formulas. In this lesson you'll learn how to use a simple formula to find
the number of days between two dates and you'll see why it's very important to type dates so that Excel
can recognize them. You'll also learn how to use the prewritten formulas called functions to do other
kinds of date math, such as finding out how many days old you are today. In the practice session at the
end of the lesson, you'll have a chance to use the formulas you've learned about.
2. Formula result
Open a blank Excel Workbook - We are going to duplicate what we see in the example on the previous
page.
Imagine that today is June 19, 2008. Your vacation starts on August 21, 2008, and you want to
find out how many days there are until vacation. To do the math, you would type a simple formula
into an empty cell.
2. Right-Click on Cell B5
5. Select Number
7. Click ok - this will give you the number 63. There are 63 days until your vacation.
Finding the number of workdays (Monday through Friday) between two dates can't be done by simply sub-
tracting one date from another. It requires a prewritten formula called the NETWORKDAYS function, which
calculates the net number of workdays between two dates.
It's still June 19, 2008, and your vacation still starts on August 21, 2008, but now you want to find how
many workdays until vacation. You would type the formula into an empty cell:
=NETWORKDAYS(A2,A3)
There are 53 workdays until vacation. The values in cells A2 and A3 are the arguments, information that
tells NETWORKDAYS what to calculate. Parentheses separate the function from the arguments. Within
the parentheses, a comma separates the arguments from each other.
Suppose you need to find a date, such as an invoice due date or pro-
ject end date, that occurs a number of workdays (Monday through
Friday) before or after a certain date. It's easy: use the WORKDAY
function.
Imagine that you have 80 workdays in which to complete a project that begins on 12/31/2008, and you
need to find the project end date. First you would enter those values into cells A7 and A8, as shown in the
picture. Next, you would enter the dates of any holidays likely to affect the calculation, each holiday in its
own cell. Then you would type the formula into an empty cell:
=workday(A2,A3,A4:A6)
The project must be completed by 4/23/09. Excel added 80 days (cell A8) to 12/31/200 (cell A7), auto-
matically excluding weekends as well as the holidays in this period listed in the argument A9:A11 (the co-
lon indicates a range of cells). A comma separates each individual argument. The parentheses separate
the arguments from the function.
=Date(2008,6+B14,19)
2008 is the year argument; 6 plus the value in cell B14 is the month argument; 19 is the day argument.
Commas separate the arguments and parentheses enclose all the arguments.
The project ends on 7/19/2010. Because you typed the cell reference (B14) instead of the value in that
cell (25), Excel can automatically update the result if the value changes. For example, if the time period
changes from 25 months to 23 months, you could get the revised date 5/19/2010 by changing the value
in cell B14 from 25 to 23, without retyping the formula.
Now imagine that you've been given 1 year, 7 months, and 5 days,
from June 19, 2008, to finish a project, and you need to find the pro-
ject end date. You would use the DATE function again, by entering
those values into cells as shown in the picture and then typing this formula into cell A22:
=Date(2008+B19,6+B20,9+B21)
2008 plus the value in cell B19 is the year argument; 6 plus the value in B20 is the month argument; 9
plus the value in B21 is the day argument.
The project ends on January 14, 2010. As in the last formula, because you typed the cell references B19,
B20, and B21, instead of the values themselves, Excel can automatically update the result if those values
change. If you were given more or less time to complete the project, Excel would automatically revise the
result when you changed a value in cells B19, B20, or B21.
The TODAY function is unusual; it's one of the few Excel functions that doesn't require any argument, al-
though it does require opening and closing parentheses: =TODAY()
TODAY inserts the current date, which is updated each time a workbook is opened or recalculated.
Just for fun, you could use the TODAY function to find out from today's date how many days old you are.
You'll see how to do that calculation in the practice session.
Note The functions in this lesson are just a few of Excel's many, many functions. In "Find functions and
enter arguments," you can learn how to find other functions, which you can use for all sorts of calcula-
tions.