Microsoft® Office Specialist 2010
Microsoft
®
Excel
®
n
O
Expert Certification
nl
y
2010
Lesson Objectives
at
io
Lesson 3: Formulas and Functions
define what a function is
use information functions
use the correct syntax for functions
use conditional logic and summary functions
insert a function
convert data types
use mathematical and trigonometric
functions
use the Error Checking Tool to mark possible
incorrect formulas
use statistical functions
trace formula errors
use financial functions
use logical functions
use the evaluate formula feature to debug a
formula
use date and time functions
check the worksheet manually for formula errors
use text functions
Fo
r
E
va
lu
In this lesson, you will learn about the different types of functions available in Excel for specific
calculations, how to activate these functions, and how to apply them. You will also look at different
ways of finding and correcting errors in your formulas. Upon successful completion of this lesson, you
will be able to:
3244-1 v1.00 © CCI Learning Solutions Inc.
91
Lesson 3
Formulas and Functions
What are Functions?
2.3
2.4
The power of a spreadsheet program comes from the ability to perform calculations based on entered values.
For simple calculations such as ‘A – B =’, the use of common mathematical operators work well. For more
complex calculations, such as computing a monthly loan payment amount, Excel spreadsheets offer a tool
called a function. Excel has a large selection of built-in functions to help you perform calculations in a
spreadsheet.
Built-in functions are grouped into the following categories:
Work with the Microsoft SQL Server Analysis Services tool to perform data mining.
Database
Extract and manipulate data within an Excel database.
Date & Time
Perform calculations on dates and times.
Engineering
Perform calculations that are typically used in engineering applications. These
functions must be loaded as part of the Analysis Toolpak add-in.
Financial
Perform financial calculations, such as loans, annuities, and cash flows.
Information
Display information about the cells in the worksheet.
Logical
Control the actions of the spreadsheet based on evaluations of data in the
spreadsheet.
Lookup & Reference
Locate information in tables or on the Internet.
Math & Trig
Perform mathematical and trigonometric calculations, such as logarithms, cosine,
and rounding.
Statistical
Perform statistical evaluations, such as average, mean, and standard deviation.
Text
Manipulate text strings and convert numbers and text.
Compatibility
Use additional functions that are used for workbooks created with Excel 2007 and
earlier versions. Any functions in this category will no longer be supported in a later
version of Excel.
va
lu
at
io
n
O
nl
y
Cube
For complete details on the available functions, refer to the Microsoft Excel Help feature or get online help
from the Microsoft Web site.
E
Using the Correct Syntax for Functions
Fo
r
When using functions in Excel, you must follow a standard syntax. The basic components of a function consist
of the “=” symbol, a function name, and its arguments. The purpose of each of these parts is as follows:
The = Symbol
Identifies the start of a formula.
Function Name
Identifies the particular function to be used.
(Arguments)
Identifies any variable portions of the argument or required parts of the formula.
You put these three components together in the following order:
=FUNCTION(Arguments)
The argument portion of a function is enclosed in parentheses and can be a single or multiple value or
reference. Commas separate multiple arguments in a function. Some functions do not require any arguments;
these functions do, however, still require parentheses.
92
3244-1 v1.00 © CCI Learning Solutions Inc.
Formulas and Functions
Lesson 3
If you do not include the “=” sign, Excel treats the function as a text label. If the function name is invalid, Excel
will display #NAME? in the cell. If you do not have the proper number of arguments, Excel displays a message
box and suggests using the Insert Function feature to complete building the function.
A function can also be used as part of a larger formula. For example:
=(SUM(A1:A5) + SUM(B1:B7)) / SUM(C1:C3)
In this example, the SUM function is used three times in the same formula. Note the use of brackets to ensure
that the calculations are performed in the sequence that you had intended. Excel follows the standard
mathematical precedence of operators:
Brackets: ()
Exponents and roots
Multiplication and division
Addition and subtraction
nl
y
1.
2.
3.
4.
O
You can also nest functions together; that is, you can embed one function within another function. An
example of nesting functions is the following:
=ROUND(SUM(C1:C5),-2)
n
You can accomplish the same result by putting the intermediate results into separate cells. In the nested
formula example above, you could put the SUM function in cell C6 so the results are displayed there. You can
then use =ROUND(C6,-2) to calculate your final result in a different cell.
io
In Excel 2010, you are permitted to nest up to 64 layers of functions. With earlier versions of Excel, you could
only nest up to seven layers.
at
Inserting Functions
Memorizing the syntax of every function is an impossible task. To make it easier to use functions, Excel has a
special tool called Insert Function.
lu
To access the Insert Function dialog box, use one of the following methods:
Click Insert Function (
type “=” (to indicate to Excel that you are entering a formula) and then type the first few characters of the
function that you want to enter. Excel displays a drop-down list of all functions that begin with these
characters; or
on the Home tab, in the Editing group, click the arrow beside AutoSum, then click More Functions; or
on the Formulas tab, in the Function Library group, click Insert Function.
E
va
) to the left of the Formula bar; or
Fo
r
The Insert Function dialog box displays all
functions grouped by most recently used or by
categories previously discussed. If you do not know
the name of the function you want to use, but you
do know what you want to accomplish, you can
type a brief description of what you want to do and
the Insert Function feature will recommend a
function for you.
3244-1 v1.00 © CCI Learning Solutions Inc.
93
Lesson 3
Formulas and Functions
After you select a function, Excel displays the Function Arguments dialog box to help you enter all of the
correct values as function arguments. Helpful features of this dialog box include:
Each argument is listed and the required arguments are highlighted in bold. If the function you’re using
allows a variable number of arguments, the dialog box displays additional argument boxes as necessary.
When the cursor is in one of the argument text boxes, the relevant help information displays in the lower
part of the dialog box.
If you select or enter data values or cell references into the argument boxes, Excel previews the data to
the right of that argument box. In the following example screen, the data values being considered are
{45;24;57;49;36}.
If enough arguments have been entered, Excel also displays the results in the lower part of the dialog
box. In this example screen, the calculated sum for the selected cell range is 211.
at
io
n
O
nl
y
=SUM(45,24,57,49,36)
va
=SUM(C1,C2,C3,C4,C5)
lu
Many of the arguments in a function permit you to select a cell or range of cells containing the values to be
used. For example, consider the following three functions:
=SUM(C1:C5)
E
Assuming that cell C1 contains the value 45, C2 contains 24, and so on, all three of these functions will result
in the displayed value of 211.
Fo
r
You can enter a value or cell range into the Function Arguments dialog box directly into the argument text
box, in the same way that they have been entered into the Number1 text box in the preceding example
screen. If you are entering a cell address reference or a cell range, you can also select this cell range directly
from the worksheet. In some situations, such as if you are using a netbook or tablet computer with a very
small screen, the Function Arguments dialog box may block your view of the cell range. If you click the
Collapse button ( ) located to the right of the argument text box, the Function Arguments dialog box
shrinks temporarily, as shown in the following screen example:
Once you have selected your cell range, press
or click the Restore (
) button located at the right
side of this text box. The Function Arguments dialog box restores to its full size.
94
3244-1 v1.00 © CCI Learning Solutions Inc.
Formulas and Functions
Lesson 3
Learn the Skill
This exercise demonstrates how to use the Insert Function feature.
Create a new blank workbook and save it as Functions – Student.
2
Enter the following values into the worksheet:
nl
y
1
O
Enter a function to total the values in column C and place the answer in cell B1.
Select cell B1.
4
Click Insert Function to the left of the Formula bar.
5
If necessary, in the Or select a category box, click the drop-down button and
click Most Recently Used.
6
In the Select a function list, click SUM, and then click OK.
As the SUM function is
by far the most
commonly used, it is
usually in the Most
Recently Used list. If it’s
not, you can find it in the
Math & Trig category.
io
n
3
at
For this exercise, you will use the Collapse and Restore buttons to enter argument
values into the Function Arguments dialog box. Alternatively, you can enter the cell range values directly into
the argument text boxes or select the cell range without collapsing the dialog box.
With the cursor in the Number1 box, click Collapse to temporarily shrink the Function Arguments dialog
box so that it does not obstruct the cell range to be selected.
8
Select cells C1 to C5 in the worksheet and click Restore to restore the Function Arguments dialog box.
9
Click OK to complete the function.
va
lu
7
10 Select cell B2 and then click Insert Function.
11 In the Search for a function box, type: standard deviation and click Go.
Fo
r
E
Excel displays a list of functions that involve the use of standard deviation. As you select each of these
functions, you will see a short description below the text box describing how the selected function
works. The STDEV function appears to be the one you are interested in. If you need further help with
that function, you can click the hyperlink at the bottom left corner of the dialog box.
12 Click the STDEV function and then click OK to display the Function Arguments dialog box.
13 If necessary, drag the Function Arguments dialog box out of the way so that it is not blocking the cell
range C1 to C5.
14 With the cursor in the Number1 box, select the cell range C1 to C5 and click OK.
Your completed worksheet should appear similar to:
15 Save and close the workbook.
3244-1 v1.00 © CCI Learning Solutions Inc.
95
Lesson 3
Formulas and Functions
Using Math and Trigonometric Functions
The intent of this courseware is to teach you basic uses of the functions in Excel, not the mathematics behind
them. The following is a list of some common mathematical functions used for general purposes:
Display the total or sum of a range or ranges.
ROUND
Round the value to the nearest value with the specified number of decimal places. If the
specified number of decimal places is negative, the number is rounded to the left of the
decimal point.
ROUNDUP
Round to the next higher positive value or next lower negative value with the number of
specified decimal places (similar to the ROUND function).
ROUNDDOWN
Round down to the next lower positive value or next higher negative value with the
number of specified decimal places (similar to the ROUND function).
INT
Round the value down to the lower whole number.
TRUNC
Use the same way as you would use ROUNDDOWN.
MODULUS
Display the remainder from a division calculation.
O
nl
y
SUM
n
2.3
2.4
The most common function in spreadsheet development is the SUM function. Other mathematical and
trigonometric functions in Excel include: ABSolute value, COSine, LOGarithm, MODulus, PI, POWER, RADIANS,
ROUND, SINe, SQuare RooT, and TANgent.
io
Note that Excel defines a specific set of arguments for each function. For example, the format of the ROUND
function is:
at
=ROUND(value, num_digits)
lu
In this function, value is the number (or cell address containing the number) you want to round and
num_digits is the number of decimals (or cell address containing the number of decimals) you require. If you
are not sure, use the Insert Function feature to enter the function correctly.
va
The ROUND function lets you specify the number of decimal places needed. By default, Excel calculates up to
a maximum of 15 digits (on both the left and right sides of the decimal point) regardless of the display format.
You may prefer to use formatting to display rounded numbers on the worksheet because this feature does
not remove the fractions from subsequent calculations. Note that rounding may adversely affect subsequent
calculations because you are actually changing the number, which may cause undesirable effects if the
rounded number is used in further calculations.
E
Learn the Skill
Fo
r
This exercise will demonstrate how the ROUND function works.
1
Open the Tour Group Cost workbook and save it as Tour Group Cost – Student.
This worksheet shows the total cost for a group of 26 people on a vacation tour. The total cost needs to be
broken down into a cost per person, which will be collected together to pay for the overall tour.
For the first calculation, you will use formatting only without the ROUND function. The result will display as
rounded to the nearest whole number.
96
2
In cell B5, type: =B1/B2 and press
3
Select cell B5 and, on the Home tab, in the Number group, click Decrease Decimal six times to suppress
the display of all digits after the decimal point.
.
3244-1 v1.00 © CCI Learning Solutions Inc.
Formulas and Functions
Lesson 3
Now use the ROUND function for the next cell, rounding it to three decimal places.
4
Move to cell B6, type: =ROUND(B1/B2,A6) and press
.
When you enter the first three
characters (“=ro”) of this
formula, Excel displays a list of
all functions that begin with
“RO”. Instead of typing the
rest of the function name,
double-click ROUND in the
list. You still have to type in
the arguments.
5
In cell B7, type: =ROUND(B1/B2,2).
6
Repeat step 5 for the remaining cell range B8 to B12, using the number
in column A as the number of decimal digits for the ROUND function.
Now calculate the total amount by multiplying the calculated result in
column B by the number of tour members.
In cell C5, type: =B5*$B$2 and press
8
Copy the formula in cell C5 to C6:C12.
.
The worksheet should now appear similar to the following:
O
7
nl
y
Instead of using the value in cell A6, you could have entered the number “3”
directly into the ROUND function. Continue with the ROUND function for
the remaining cells in column B.
at
io
n
This worksheet clearly demonstrates the difference between
formatting and using the ROUND function. In cell B5, the
number appears to be rounded to the nearest whole number.
However, the cell still maintains all of the decimal digits as
evidenced by the fact that the total calculated cost in cell C5
matches the original total.
va
lu
In cells B6 to B12, you see a progression of how the rounding function works. Negative numbers will cause
rounding to that power of 10; at the extreme end, a “-3” means “10 to the power of -3,” which is 1000;
therefore, 3356 would round down to 3000. You can see that, with increased rounding, each calculated total
moves further away from the original total group cost, and at a faster rate (i.e., 3000 * 26 = 78,000). Therefore,
if you collect $3356 from each person in the tour group, you will be short of the total by only $9.55. But if you
collect $3000 from each person, you will be short by $9265.55.
This demonstrates that rounding actually changes the resulting number in that cell.
9
Save and close the workbook.
E
Using Statistical Functions
Fo
r
A spreadsheet is a natural tool for recording statistical data. Excel provides a long list of standard statistical
functions to analyze the data, including CONFIDENCE interval, CORRELation coefficient, NORMal DISTribution,
POISSON distribution, STandard DEViation, sample VARiance, and more.
2.4
Some of the most common statistical functions for general purposes include:
AVERAGE
Calculate the mean of the numbers in the list of arguments.
COUNT
Count how many cells in the argument list contain values. This function does not count cells
with text or blank cells.
COUNTA
Count how many cells in the argument list are not empty. This function counts cells that appear
empty from using spaces to clear cells.
MAX
Display the largest number in the argument list.
MEDIAN
Display the median of the numbers in the argument list.
MIN
Display the smallest number in the argument list.
3244-1 v1.00 © CCI Learning Solutions Inc.
97
Lesson 3
Formulas and Functions
Learn the Skill
This exercise demonstrates some of the statistical functions in Excel.
1
Open the Snow Mountain workbook and save as Snow Mountain – Student.
2
Select cell B13 and, on the Home tab, in the Editing group, click the arrow for AutoSum.
3
Select Count Numbers from the list box.
4
Select the cell range B5:B11 and then press
5
Enter the following formulas:
nl
y
You can enter function names
and cell references in upper or
lower case.
You do not have to enter
closing parentheses for most
functions (except nested
functions, as in B16);
however, it is a good habit
to do so anyway.
Formula
=COUNTA(B5:B11)
O
=SUM(B5:B11)
n
=ROUND(AVERAGE(B5:B11),1)
=MAX(B5:B11)
=MIN(B5:B11)
=AVERAGE(B5:I11)
=STDEV(B5:I11)
io
Cell
B14
B15
B16
B17
B18
B20
B21
.
6
Copy the formulas from B13:B18 to C13:I18.
7
Decrease the number of decimals for cells B20 and B21 to one decimal place.
Fo
r
E
va
lu
at
The worksheet should now appear similar to the following:
Notice the different results between the COUNT (row 13) and COUNTA (row 14) in the way they treat
cells that contain text characters instead of numbers. Also, notice that the AVERAGE, MIN, and MAX
functions ignore cells that do not contain numeric values; for example, in columns B and H, the MIN
results are not zero.
8
98
Save and close the workbook.
3244-1 v1.00 © CCI Learning Solutions Inc.
Formulas and Functions
Lesson 3
Using the Subtotal Function
The SUM function calculates an arithmetical total of the selected cell range. In most situations, it is the
appropriate function for automatically adding together the value in multiple cells.
For complex data tables, it may be more appropriate to use the SUBTOTAL function.
The SUBTOTAL function does more than calculate a sum total for a range of cells; it actually performs a variety
of statistical operations, depending on which function number is used. The general format of the SUBTOTAL
function is:
=SUBTOTAL(Function #, Cell Range)
Function
AVERAGE—mean average of the cell range
COUNT—number of cells containing numbers
COUNTA—number of non-blank cells
MAX—highest value in the cell range
MIN—lowest value in the cell range
SUM—sum total of the cell range
O
Function #
1
2
3
4
5
9
nl
y
The most commonly used function numbers are:
n
Other function numbers that are also available for SUBTOTAL are:
Function
PRODUCT (all numbers multiplied together)
STDEV.S (standard deviation based on a sample)
STDEV.P (standard deviation based on entire population)
VAR.S (variance based on a sample)
VAR.P (variance based on entire population)
at
io
Function #
6
7
8
10
11
lu
The primary advantage of SUBTOTAL is that it will not include any other SUBTOTAL calculations within its
range. As a result, you can insert subtotal, total, and grand total calculations into a table—without any risk of
accidentally double-counting a subtotal—by simply including the entire range of cells.
To insert the SUBTOTAL function, use one of the following methods:
Click Insert Function and then, in the Or select a category field, click Math & Trig; or
on the Formulas tab, in the Function Library group, click Math & Trig.
va
E
Learn the Skill
Fo
r
This exercise demonstrates the use of the different SUBTOTAL function numbers.
1
Open the Weekly Expense Report workbook and save it as Weekly Expense Report – Student.
First, use the traditional SUM function to calculate the subtotal values in column B.
2
Select cell C6 and then, on the Home tab, in the Editing group, click AutoSum. Verify that only cell C5 is
selected as the argument for the SUM function and press
.
3
Select cell C9 and then, on the Home tab, in the Editing group, click AutoSum. Verify that only cell C8 is
selected as the argument for the SUM function and press
.
4
Select cell C13 and then, on the Home tab, in the Editing group, click AutoSum. Verify that both
expense values in the cells above are selected and press
.
5
Repeat either step 3 or 4 (depending on whether there is one or two values to add together) for each of
the remaining subtotal cells in cells C17, C21, C24, E6, E9, E13, E17, E21, and E24.
3244-1 v1.00 © CCI Learning Solutions Inc.
99
Lesson 3
Formulas and Functions
at
io
n
O
nl
y
The worksheet should now appear similar to the following:
Up to this point, both columns C and D have been identical; subtotal values have been calculated for each
travel office. You will now try to calculate the grand total for all offices.
lu
To do this, you will deliberately create an incorrect grand total for column C, which you will use for
comparative purposes.
Select cell C25 and then, on the Home tab, in the Editing group, click AutoSum. Select cells C5:C24 and
press
.
7
Enter the following formulas:
Formula
=AVERAGE(C5:C25)
=COUNT(C5:C25)
=MAX(C5:C25)
=MIN(C5:C25)
Fo
r
E
Cell
C26
C27
C28
C29
va
6
Now enter the correct formulas for column E; the grand total of =SUM(E6,E9,E13,E17,E21,E24) picks up only
the subtotal values.
8
Select cell E25 and then, on the Home tab, in the Editing group, click AutoSum.
To select individual cells instead of the full range as you did in step 6, you must use the
9
Select cell E6, hold down the
the
key and press
.
key.
key, and then click on each of cells E9, E13, E17, E21, and E24. Release
Notice that the grand total in column E is half of the grand total in column C. This demonstrates that the latter
value is double-counting everything in column C.
100
3244-1 v1.00 © CCI Learning Solutions Inc.
Formulas and Functions
Lesson 3
10 Enter the following formulas:
Cell
E26
E27
E28
E29
Formula
=AVERAGE(E5,E8,E11,E12,E15,E16,E19,E20,E23)
=COUNT(E5,E8,E11,E12,E15,E16,E19,E20,E23)
=MAX(E5,E8,E11,E12,E15,E16,E19,E20,E23)
=MIN(E5,E8,E11,E12,E15,E16,E19,E20,E23)
For step 10, you could save
time by using absolute cell
references for the
AVERAGE formula,
copying them to the
remaining cells, and
changing the function
name.
As you can see, step 10 was painful—it was tedious and error-prone.
va
lu
at
io
n
O
nl
y
The worksheet should now appear similar to the following:
Now use the SUBTOTAL function and see how it works.
E
11 Select cell G6 and enter: =SUBTOTAL(9,G5).
12 Now enter the remaining subtotal formulas:
Formula
=SUBTOTAL(9,G8)
=SUBTOTAL(9,G11:G12)
=SUBTOTAL(9,G15:G16)
=SUBTOTAL(9,G19:G20)
=SUBTOTAL(9,G23)
Fo
r
Cell
G9
G13
G17
G21
G24
Note that you can select the cell or cell range instead of typing the cell reference addresses into the function,
if that is easier for you.
13 Select cell G25 and enter: =SUBTOTAL(9,G5:G24).
Enter the remaining statistical functions using SUBTOTAL.
3244-1 v1.00 © CCI Learning Solutions Inc.
101
Lesson 3
Formulas and Functions
14 Enter the following formulas:
Cell
G26
G27
G28
G29
Formula
=SUBTOTAL(1,G5:G25)
=SUBTOTAL(2,G5:G25)
=SUBTOTAL(4,G5:G25)
=SUBTOTAL(5,G5:G25)
nl
y
Step 14 was much easier to do than step 10 because you simply selected the entire cell range in the
column (including the grand total). The SUBTOTAL function simply ignored the presence of any other
SUBTOTAL function within that cell range. As a result, column G shows the same results as column E. It
was just as easy in column C to enter those formulas, but the results were incorrect.
va
lu
at
io
n
O
The worksheet should now appear similar to the following:
E
15 Save and close the workbook.
Working with Financial Functions
Fo
r
Several financial functions are built into Excel. These financial calculations have some very complex
mathematics underneath, so they are useful in many applications. They are particularly useful when using
worksheets that require calculations of loan payments, annuities, and related calculations. Some of the more
useful financial functions include:
2.4
102
PMT
Calculate the payment required for a given principal, interest rate, and number of time periods.
NPV
Calculate the Net Present Value of a stream of cash flows.
PV
Calculate the Present Value of an ordinary annuity or series of payments.
FV
Calculate the Future Value of an ordinary annuity or series of payments.
3244-1 v1.00 © CCI Learning Solutions Inc.
Formulas and Functions
Lesson 3
As an example, the PMT function requires that you specify the principal (amount borrowed), the interest
rate, and the term (repayment period). The function also includes two optional arguments: ending balance
(termination/buy out) and type (when payments will be made; enter “0” or leave this blank for the end of the
month or enter “1” for the beginning of the month). The format is:
=PMT(interest,term,principal,ending balance,type)
When you enter the values for interest and term, ensure that you express them in the same time units. For
example, if you want to find the monthly loan payment, you must ensure that both interest and term are
expressed in months. If you are given an annual interest rate, you must divide that value by 12. And if the
term is in years, you must multiply that value by 12.
interest rate = 6% / 12 = 0.5% per month
term = 5 x 12 = 60 months
nl
y
For example, to calculate the monthly payment for a loan with an annual interest rate of 6% and a term life of
five years, the arguments used in the PMT function are:
n
O
Note: The PMT function cannot be used to correctly calculate mortgage payments in some countries,
such as Canada, where interest on residential mortgages is calculated semi-annually, not in advance. As a
result, the monthly payment amount is lower because the interest is not compounded monthly. The PMT
function does correctly calculate the mortgage payments in other countries that do not have this rule, such as
the United States.
at
Learn the Skill
io
In general, Excel calculates the Total per Term by using the number of monthly payments multiplied by the
amount of the monthly payment. The Total Interest paid is based on the Total per Term minus the amount of
the Loan.
lu
This exercise demonstrates the use of the PMT function on a loan used to pay for vacation
travel.
va
A loan analysis table enables you to see the amount of principal and interest that is paid on a loan monthly or
yearly. Once completed, the spreadsheet can be used to quickly determine the payments required for any
loan amount, interest rate, and term.
Open the Monthly Payments workbook and save it as Monthly Payments –Student workbook.
2
Use the following data for the loan payment calculation:
Amount of Loan (B1)
5,000
Interest Rate (B2)
.06
Term of Loan (B3)
12
Ending Balance (B4)
0
Payment Type (B5)
0
Payment/Month (B7)
=PMT(B2/12,B3,‐B1,B4,B5) Total/Term (B8)
=B7*B3
=B8‐B1 Total Interest (B9)
Fo
r
E
1
Because the Ending
Balance and Payment
Type values are both
zero, the last two
arguments of the
function could be
omitted, in this case.
Note that the interest rate used here is for a full year, but the term is in
months. The interest rate must be converted into a monthly rate. The loan
will be fully paid off at the end of the term, so the ending balance will be zero.
3
Select cells B12:E23. On the Home tab, in the Number group, click the arrow for Number Format, and
click Currency.
4
In cell B12, type: =B1 to represent the initial loan amount.
5
In cell C12, type: =B12*$B$2/12.
3244-1 v1.00 © CCI Learning Solutions Inc.
103
Lesson 3
Formulas and Functions
This will show the amount of interest to be paid in the first month. You will be copying this formula, so
you will have to make the entry in the Interest Rate cell into an absolute cell reference.
6
In cell D12, type: =$B$7‐C12 as the formula to subtract the interest paid from the Monthly Payment.
Note that you must make the formula in cell B7 absolute because you will be copying this formula.
7
In cell E12, type: =B12‐D12 to calculate the Beginning Principal less the Principal paid for the current
month.
Complete the table by following these steps.
In cell B13, type: =E12 to represent the Ending Balance of the first month.
9
Copy the range of cells C12:E12 to cells C13:E13.
nl
y
8
10 Copy the range of cells B13:E13 to cells B14:E23.
va
lu
at
io
n
O
The worksheet should now appear similar to the following:
E
Note that the ending balance in cell E23 is $0.00.
11 Save and close the workbook.
Fo
r
Using Logical Functions
One of the most powerful and useful features of spreadsheets is the ability to perform calculations that
depend on a condition that will become true. The primary function used for this is the IF function. This
function makes an evaluation or logical test and performs one of two functions based on the result. This
automatic evaluation provides on-the-fly worksheet calculations.
The format of the IF function is as follows:
=IF(logical test,value if true,value if false)
104
Logical Test
This specifies what the IF statement will evaluate.
Value if True
If the Logical Test is found to be true, the result of the IF function will be whatever is in this
section of the formula.
Value if False
If the Logical Test is found to be false, the result of the IF function will be whatever is in
this section of the formula.
3244-1 v1.00 © CCI Learning Solutions Inc.
Formulas and Functions
Lesson 3
The Logical Test section of the statement can include comparison operators that will help you obtain the
desired result. Qualifiers are punctuation marks used to identify or define different types of data; for example,
text used in a formula requires double quotes as qualifiers. Qualifiers also enable you to evaluate for a range
of numbers or results.
Some of the comparison operators you can use are:
Equal to (or the same as)
Greater than
Less than
Greater than or equal to
Less than or equal to
Not equal to
nl
y
=
>
<
>=
<=
<>
=IF(A1=10, “text A”,IF(A1=20, “text B”, “text C”))
O
The Value if True/False sections can contain a text string, values, or other functions. In fact, you can nest or
embed up to 64 IF functions within one IF statement. An example of a nested IF function would look as
follows:
Then this will display
text A
text B
text C
io
If A1 contains
10
20
Any other value
n
In this example, the following values will be displayed when the conditions are met:
Two additional functions combine the power of the IF function with the COUNT and SUM functions:
For the selected range of cells, include only those cells in which the logical test value will have a
result that is true in the count.
SUMIF
For the selected range of cells, include only those cells in which the logical test value will have a
result that is true in the sum.
lu
at
COUNTIF
There are more conditional statistical functions, but these two are the most commonly used ones of that type.
va
Learn the Skill
E
This exercise demonstrates the use of the IF function.
Fo
r
Tolano Adventures offers a promotional rebate program for customers who spend over $10,000 during the
year. You will use a worksheet that will calculate the rebate at 2% of the amount spent over $10,000. There is
no rebate if the amount is less than $10,000.
1
Open the Customer Sales Rebate workbook and save it as Customer Sales Rebate –Student.
2
Select cell D2 and click Insert Function
3
In the Or select a category list, click Logical.
4
In the Select a function list, click IF and click OK.
As the rebate only applies to amounts in excess of $10,000, the logical test will evaluate the sales value in the
adjacent cell (C2) and determine if this amount is in excess of $10,000.
5
In the Logical_test field, type: C2>10000.
The next section is the Value_if_true section. If the value in the cell on the left (C2 in this case) is in excess of
10,000, you want the function to calculate the rebate as 2% of the sales amount.
6
In the Value_if_true field, type: C2*0.02.
3244-1 v1.00 © CCI Learning Solutions Inc.
105
Lesson 3
Formulas and Functions
The last part of the formula is the Value_if_false section. If the figure to the left is less than or equal to 10,000,
you want the function to return a zero.
7
In the Value_if_false field, type: 0.
8
O
nl
y
The Function Arguments dialog box appears as follows:
Click OK.
n
Note that the resulting formula is =IF(C2>10000,C2*0.02,0).
9
io
The formula contains a relative cell address (C2); therefore, you can copy the formula into the other parts of
the worksheet.
Copy the formula from cell D2 to cells D3:D26.
at
Calculate the total rebates to be paid out to customers.
to accept
lu
10 Select cell D27 and, on the Home tab, in the Editing group, click AutoSum; then press
it.
Fo
r
E
va
The worksheet should now appear similar to the following:
11 Save and close the workbook.
106
3244-1 v1.00 © CCI Learning Solutions Inc.
Formulas and Functions
Lesson 3
You can modify your IF function if you want a more presentable worksheet. For example, if you want the IF
formula to show a blank cell instead of zeros or dashes when there is no rebate, modify the formula to appear
as follows:
=IF(C2>10000,C2*0.02," ")
The double quotes will cause Excel to insert a blank in any cell that proves FALSE
based on the argument in the Logical_test.
Another possible alternative would be to display a message:
=IF(C2>10000,C2*0.02,"does not qualify")
To have either example work properly, remember to copy the changed formula
to the other cells on the worksheet.
Excel’s date and time functions help you create worksheets that perform calculations based on dates and
times. It is possible to use dates to calculate things such as age or length of service or number of days
between two dates. The use of time functions enables calculations based on time, with Excel converting
seconds to minutes and minutes to hours.
O
2.4
nl
y
Using Date and Time Functions
When using Insert
Function, Excel inserts the
quotes for you. If you
want the False Value to be
blank, you must type both
quotes or the word False
will appear in the cell.
io
n
To do these calculations, Excel stores the date and time values as serial numbers with the integer portion
being the number of days since January 1, 1900 and the fractional part as a portion of 24 hours. Special
functions are provided to determine the date and time serial numbers, and to extract the month, day, year,
hours, minutes, and second values from serial numbers.
Some of the most useful date and time functions include:
Return the serial number of the current date and time. This date and time value is
continuously updated.
TODAY
Return the serial number of today’s date with the time portion set to 0. This date value is
continuously updated.
DATE
Calculate the serial number for a specified date.
DATEVALUE
Calculate the serial number for a specified date, which is in general text form.
va
lu
at
NOW
DAY
Display the day value for the specified date serial number.
MONTH
Display the numeric month value for the date serial number.
Display the year value for the specified year serial number.
E
YEAR
Display a numeric weekday value for the date serial number.
HOUR
Display the hour value for the specified time serial number.
Fo
r
WEEKDAY
MINUTE
Display the minute value for the specified time serial number.
SECOND
Display the second value for the time serial number.
For example, the format for the DATE function is as follows:
=DATE(YEAR,MONTH,DAY)
The format for the =TIME function is as follows:
=TIME(HOUR,MINUTE,SECOND)
A different way of obtaining the current date is by pressing
+
, and the current time by pressing
+
. However, these date and time values do not change; they always stay as the original values.
3244-1 v1.00 © CCI Learning Solutions Inc.
+
107
Lesson 3
Formulas and Functions
Learn the Skill
This exercise demonstrates the use of date and time functions.
1
Open the Departure Date Calculator workbook and save it as Departure Date Calculator – Student.
2
Select cell B3 and enter a date in the future of your choice.
Use a function to obtain the current date and time. It automatically updates itself over time.
Select cell B4 and enter: =NOW().
nl
y
3
Perform a calculation using dates. These calculations look just like ones using numeric values.
4
Select cell B6 and enter: =B3‐B4. Enter the following functions:
Formula
n
=MONTH(B4)
=DAY(B4)
=YEAR(B4)
=HOUR(B4)
=MINUTE(B4)
=SECOND(B4)
at
Cell
B8
B9
B10
B11
B12
B13
io
5
O
Extract the components of today’s date and time value into individual numbers.
Create a new date value using the month, day, and year numbers.
6
Select cell B15 and enter: =DATE(B10,B8,B9). Even though some of the
cells only show two digits
of the year value, Excel
uses four digits internally
to ensure the date
calculations are correct.
Fo
r
E
va
lu
The worksheet should now appear similar to the following:
Recalculate the current date and time, and note the changes in cells B12 and B13.
108
7
Press the
key.
8
Save and close the workbook.
3244-1 v1.00 © CCI Learning Solutions Inc.
Formulas and Functions
Lesson 3
Using Text Functions
Excel includes several text-oriented functions that are useful for handling text strings. They are often used to
manipulate data imported from other sources. Some of the most useful text functions include:
Convert a number into the equivalent text string formatted as specified.
TRIM
Remove any blanks from the text string.
LEFT
Extract the specified number of characters starting from the left side of the text string.
RIGHT
Extract the specified number of characters starting from the right side of the text string.
MID
Extract the specified number of characters starting from any position in the text string.
LEN
Determine the number of characters in a text string.
FIND
Search a text string for specified characters, and return the starting position if the characters
are found. The FIND function is case sensitive. The SEARCH function is the same as the FIND
function but is not case sensitive.
UPPER
Convert all characters in a text string to uppercase.
LOWER
Convert all characters in a text string to lowercase.
PROPER
Convert the first letter of the text string and any letter following a non-alphabetic character to
uppercase. All other characters are set to lowercase.
REPLACE
Replace text at a specified location in a text string with new text.
REPT
Create a text string by repeating the specified characters for the specified number of times.
SUBSTITUTE
Replace text of a specific pattern in a text string with new text.
io
n
O
nl
y
TEXT
at
2.4
lu
In addition to text functions, strings of text can be joined or concatenated using the & operator. When
spreadsheets are used for lists or as a database, these often overlooked functions can save many hours of
manually entering data.
va
Learn the Skill
E
This exercise is designed to demonstrate how text functions can be used to change
character strings.
Create a new, blank workbook.
2
Enter the following values:
Fo
r
1
Cell
A1
B1
A5
Value
JaNe
pArkER‐smiTh
BIRTHDAY
3
Increase the width of columns A, B, and C to 22.
4
Select cell C1 and type: =A1&" "&B1.
The space between the quotation marks is required to separate first and last names.
5
Select cell A2 and type: =LOWER(A1).
6
Select cell A3 and type: =UPPER(A1).
7
Select cell A4 and type: =PROPER(A1).
3244-1 v1.00 © CCI Learning Solutions Inc.
109
Lesson 3
8
Formulas and Functions
Copy cells A2:A4 to B2:C4.
Notice that Excel inserts capitals in all the proper locations, including after the hyphen.
9
In cell A6, type: =LEFT(A5,5).
10 In cell A7, type: =RIGHT(A5,3).
11 In cell A8, type: =LEFT(A5,3)&MID(A5,6,1). nl
y
Use the functions for replacing and substituting text characters to create new words. The REPLACE function
substitutes text characters at a starting position for the specified number of characters. The SUBSTITUTE
function replaces a specified pattern of text characters with a new set of characters, regardless of where the
characters are located.
12 In cell B5, type: =REPLACE(A5,1,5,"SUN"). 13 In cell C5, type: =SUBSTITUTE(A5,"DAY","STONE").
io
n
O
The worksheet should now appear similar to the following:
at
14 Save the workbook as Text Functions – Student and close it.
Using Information Functions
lu
ISBLANK
ISNA
Return a TRUE value if the cell or formula being tested has no entry in it.
Return a TRUE value if the referenced cell or function has any kind of error.
E
ISERROR
va
2.3
2.4
These functions return a simple true or false condition based on the arguments provided. The information
functions can refer to cells or test the results of formulas. When combined with the IF function, the
information functions can be used to control a variety of conditional processing tasks. Some commonly used
information functions include:
Return a TRUE value if the cell or function results contain any value other than text characters,
or is blank.
Fo
r
ISNONTEXT
Return a TRUE value if the selected cell or function results in a # N/A error message.
110
ISTEXT
Return a TRUE value if the selected cell contains text-only characters.
ISNUMBER
Return a TRUE value if the cell or function results contain a numeric value.
NA
Return the # N/A error value. It is often used as part of the logical IF function.
3244-1 v1.00 © CCI Learning Solutions Inc.
Formulas and Functions
Lesson 3
Learn the Skill
This exercise demonstrates the use of some of the information functions in Excel.
1
Create a new, blank workbook.
2
Enter the following values:
Function
=ISNUMBER(B2)
=IF(ISNUMBER(B2),"B2 is a number","B2 is not a number")
=ISTEXT(B3)
=ISNONTEXT(B4)
=IF(B5=0,NA(),A5/B5)
=IF(ISNA(C5),"Error: Attempt to divide by zero!","") n
Cell
C2
D2
C3
C4
C5
D5
O
Enter the following functions into the cells indicated:
io
3
Value
String
325.1
Plain
10
0
nl
y
Cell
B2
B3
B4
A5
B5
Now change the values as follows:
Value
15
Variable
(delete the value)
E
Cell
B2
B3
B4
B5
va
4
lu
at
The worksheet should now appear similar to the following:
Fo
r
5
5
If you wish, enter other values of your choosing into cells B2, B3, B4, A5, and B5.
6
Save the workbook as Information Functions – Student and close it.
Using Lookup and Reference
Lookup functions are used to find information in lists or arrays based on a known value. This capability is very
useful in situations such as locating product information in the form of a table containing product IDs, with
the description and price next to each ID. You can scan down the list until you find the Product ID, then easily
look at the adjacent columns to find the description and price for that product. That is the basic principle of
the lookup functions: look for a value in a table and select the corresponding values in adjacent cells.
3244-1 v1.00 © CCI Learning Solutions Inc.
111
Lesson 3
Formulas and Functions
These functions can also be considered as array functions because the data used for lookups are in the form
of arrays. In other words, the lookup functions search through a one-dimensional (row or column) or twodimensional range of cells containing data to extract a value.
The most common lookup and reference functions are:
Select from a one-dimensional list of values (called a vector) by using an index number. This is
the simplest form of lookup.
INDEX
Select from a two-dimensional list of values.
HLOOKUP
Perform a lookup across the first row of a two-dimensional array selecting the column that
matches the search value. An index number is used to select the row from which the value will
be returned.
VLOOKUP
Perform a vertical lookup, in much the same way that HLOOKUP performs a horizontal lookup.
nl
y
CHOOSE
The format for the vertical lookup function is as follows:
Similarly, the format for the horizontal lookup function is as follows:
O
=VLOOKUP(lookup value,table array,column index number,range lookup)
=HLOOKUP(lookup value,table array,row index number,range lookup)
The value to be found in the table array.
table array
The location or table of information where the data can be found.
column index
number
The column used in a specific row to find the item; columns are numbered sequentially from
the left-most column.
row index
number
The row used in that column to find the item; rows are numbered sequentially from the top
row of the table.
range lookup
You can enter “0” or “false” if you wish the function to find an exact match in a sorted or
unsorted list; enter “true” or “omit argument” if you want the function to find an
approximate match in a sorted list.
lu
at
io
n
lookup value
va
Even though the range lookup parameter is optional, it has an important switch setting that deserves a closer
look. Consider an example of a scoring sheet for a school examination paper:
Grade Assigned
Fo
r
E
Mark Achieved
on Exam
0%
50%
60%
70%
85%
F
D
C
B
A
All students will have a result ranging from 0% to 100%. The VLOOKUP formula would be used here because
the data are aligned vertically. By using a range lookup value of TRUE, you tell Excel to search the table for the
highest mark value that does not exceed the lookup value. For example, a student achieving a mark of 65%
will get a grade value of C because 60% is the highest table value found that does not exceed the lookup
value.
If a range lookup value of FALSE is used, the VLOOKUP formula will not find the correct grade for most
students. This is because the mark achieved must exactly match one of the values in the table in order to be
found. Therefore, a range lookup value of FALSE is not the right choice to use here.
112
3244-1 v1.00 © CCI Learning Solutions Inc.
Formulas and Functions
Lesson 3
If the scoring sheet is structured horizontally, the HLOOKUP formula should be used instead, as follows:
Mark Achieved
on Exam
Grade Assigned
0%
50%
60%
70%
85%
F
D
C
B
A
The same range lookup value of TRUE can be used to find the correct grade to assign, even though the
student’s mark can be any value between 0% and 100%. And the range lookup value of FALSE is also
inappropriate for this HLOOKUP formula because most students will not have a mark that matches the table
values exactly.
nl
y
Learn the Skill
This exercise is designed to demonstrate the use of the VLOOKUP function in an invoice
worksheet.
O
Open the Pricing Sheet workbook and save it as Pricing Sheet – Student. Notice that the tour
numbers are sorted in
ascending order. This
is required for the
lookup function to
work properly.
lu
at
io
n
1
va
This worksheet shows a partial tour pricing list on the top and a sample invoice below it.
The requirement is to enter a product number in column B of the invoice and have the
description and cost appear on the invoice automatically. In this case, Excel will look up
the product number in an inventory and retrieve the corresponding description and cost.
In cell E12, type: =A12*D12 and press
3
Copy this formula to range E13:E14.
4
In cell E15, type: =SUM(E12:E14) and press
5
In cell C12, type: =VLOOKUP(B12,$B$5:$D$8,2,TRUE) and press
E
2
In a real-world example,
the inventory list would be
on a different worksheet
or, more often, in a
different workbook. This
exercise has been
simplified for instructional
purposes.
.
.
.
Fo
r
The characters #N/A appear in cell C12.
6
Copy this formula to the range C13:C14.
7
In cell D12, type: =VLOOKUP(B12,$B$5:$D$8,3,TRUE) and press
8
Copy this formula to range D13:D14.
3244-1 v1.00 © CCI Learning Solutions Inc.
.
113
Formulas and Functions
nl
y
Lesson 3
Enter the following quantities and part numbers:
Qty
Tour#
3 4 2
A0289
B3454
A4350
io
Row
12
13
14
n
9
O
Notice the #N/A filling the cells; this is displayed by the lookup functions when there is no lookup value.
The IF function could be used to clean up its appearance, but this exercise focuses on the lookup
function.
E
va
lu
at
The worksheet should now appear similar to the following:
Fo
r
The last item entered had the wrong tour number. As a result, the wrong description and cost were displayed.
For this kind of worksheet, you should use the FALSE value for the range lookup option so that Excel will
identify incorrect tour numbers immediately.
10 Select cell C12, press
, and change the TRUE to FALSE in the VLOOKUP formula.
11 Repeat step 10 for cell D12.
12 Copy the formulas in cell C12:D12 to cells C13:D14.
114
3244-1 v1.00 © CCI Learning Solutions Inc.
Lesson 3
nl
y
Formulas and Functions
13 Select cell B14 and enter the correct tour # value: A4353.
lu
at
io
n
O
The worksheet should now appear similar to the following:
14 Save and close this workbook.
va
Converting Data Types
E
Several Excel functions are dedicated to changing data from one type to another. In computer systems, data
types are very important because all other calculations, operations, and functions expect to work with specific
data types. For example, the computer is not able to perform arithmetic with alphabetical characters or use
text functions (such as choosing upper case) on numbers or date values.
Fo
r
Suppose you wanted to create the following sentence: “You are <A1> years old,” in which cell A1 contains a
person’s age as a number. The first and last halves of the sentence are text strings. You can use the
CONCATENATE function to attach multiple text strings together into a single longer one. However, the
CONCATENATE function requires every component to be a text string. To insert the age into the middle, you
must convert the number into its equivalent text value and then concatenate the three pieces together. The
resulting formula would then be:
=CONCATENATE("You are ",TEXT(C2,"0.0")," years old"))
3244-1 v1.00 © CCI Learning Solutions Inc.
115
Lesson 3
Formulas and Functions
The following conversion functions are commonly used:
Convert a number in the range of 0 to 255 to its equivalent text character.
CODE
Convert a text character to its equivalent internal code (the reverse of CHAR). If the argument
is a string containing more than one character, it converts only the first one.
DATEVALUE
Convert a text string that contains a date to a date value.
DOLLAR
Convert a number to a text string using the local currency format. You can also specify the
number of digits to show after the decimal point.
FIXED
Convert a number to a text string using the standard number format. You can also specify the
number of digits to show after the decimal point.
TEXT
Convert a number to a text string using a custom display format that you also specify.
VALUE
Convert a text string containing a number to a numeric value.
nl
y
CHAR
O
Learn the Skill
io
Open the Conversion Functions workbook and save it as Conversion Functions – Student.
va
lu
at
1
n
This exercise demonstrates how to use functions that will convert data values from one
type to another.
Start with an ordinary number in a cell.
2
Select cell C2 and enter: 12.
3
E
Now enter a function that will convert a number into its equivalent text string.
Select cell D2 and enter: =TEXT(C2,"0").
Fo
r
You can see that the number in cell C2 is right-aligned, which is the default treatment for numbers, and
the text in cell D2 is left-aligned, which is the default for text strings.
Let’s see what happens when we enter arithmetical formulas for both cells.
4
Enter the first row of values or formulas:
Cell
F2
G2
Value
=C2+10
=D2+10
Surprisingly, Excel has no problem with performing arithmetic on a cell containing a text string.
Now enter the number 12 as a text string. To do so, you must use the single quote as the very first character of
the string, which Excel will understand as an instruction to treat the rest of the data entered as a text string.
Without that single quote, Excel will automatically convert anything that looks like a proper number to a
number, and anything that looks like a date to a date format.
116
3244-1 v1.00 © CCI Learning Solutions Inc.
Formulas and Functions
5
Lesson 3
Select cell C3 and enter: '12.
Excel displays a smart tag in the upper left corner of this cell to warn you that the value looks like a
number but that you have entered it as a text string.
Now enter a conversion function for the next cell to convert it to the equivalent number.
6
Select cell D3 and enter: =VALUE(C3).
Notice the default alignment used in these two cells.
Now copy the arithmetical formulas from the row above.
Copy the formulas in F2:G2 down to F3:G3.
nl
y
7
For the next set, you will try converting a number to a date value.
8
Select cell C4 and enter: 4194.3595.
9
Select cell D4 and enter: =C4.
O
Since a date value is really a number (the number of days since January 1, 1900), you only need to change the
formatting to a date or date and time format.
io
11 Copy the formulas in F3:G3 down to F4:G4.
n
10 Select cell D4 again and then, on the Home tab, in the Number group, click the dialog box launcher. In
the Format Cells dialog box, select Date under Category (in the Number tab), and click
3/14/01 1:30 PM in the Type list, then click OK.
For the next set, you will convert a date and time value to a number.
lu
13 Select cell D5 and enter: =C5.
at
12 Select cell C5 and enter: =NOW(). (You may need to widen column C in order to fully display the date and
time.)
14 Copy the formulas in F4:G4 down to F5:G5.
For the next set, you will convert a text string containing a date value to a date.
va
15 Select cell C6 and enter: 'June 25, 2011.
16 Select cell D6 and enter: =DATEVALUE(C6).
E
17 Copy the formulas in F5:G5 down to F6:G6.
Excel has again interpreted a cell containing what appears to be a date value and treated it as a date
value so that the arithmetic operation could be performed in cell F6.
Fo
r
For the next set, you will convert a number to its equivalent text character, and the reverse.
18 Select cell C7 and enter: 65.
19 Select cell D7 and enter: =CHAR(C7).
20 Select cell C8 and enter: a.
21 Select cell D8 and enter: =CODE(C8).
Notice that the internal code value for “A” is different than for “a”.
22 Copy the formulas in F6:G6 down to F7:G8.
The arithmetical operation in cells G7 and F8 failed because Excel is not able to perform this function
with alphabetical characters.
For the next set, you will convert a number to a dollar currency format and a text string format.
3244-1 v1.00 © CCI Learning Solutions Inc.
117
Lesson 3
Formulas and Functions
23 Select cell C9 and enter: 12345.6789 then enter it into cell C10 as well.
24 Select cell D9 and enter: =DOLLAR(C9,2).
25 Select cell D10 and enter: =FIXED(C10,2,FALSE).
26 Copy the formulas in F8:G8 down to F9:G10.
O
nl
y
The worksheet should now appear similar to the following:
Using Advanced Functions
io
Using Conditional Logic Functions
n
27 Save and close the workbook.
at
2.3
Most Excel functions simply perform their calculations and display the results in the cells in which they are
located. Conditional logic functions are useful in situations where you want to perform one of two different
calculations, depending on what the value is in one or more cells other than the one in which they are
located.
va
This function returns the logical opposite value of a logical result. That is, a TRUE value is
reversed to a FALSE, and a FALSE is reversed to a TRUE.
NOT(logical test)
You can enter only one logical value in this function.
Fo
r
NOT
The AND function allows multiple logical tests to be performed, and all of them are combined
together to return a single TRUE or FALSE value. The AND function returns a TRUE value only if all
of the logical tests are TRUE. It returns a FALSE value if any of the logical tests result in a FALSE
value.
AND(logical test 1, logical test 2, ...)
You can have up to 255 logical tests in an AND function.
E
AND
lu
In the IF function (described above in the Using Logical Functions topic), you are permitted to have only one
logical test that results in a TRUE or FALSE value. If you need to perform two or more different logic tests, then
you must either nest that number of IF functions inside each other, or use an AND or OR function.
OR
Like the AND function, the OR function evaluates multiple logical tests to return a single TRUE
or FALSE value. Unlike the AND function, this function returns a TRUE value if any of the logical
tests are TRUE. It returns a FALSE value only if all of the logical tests result in a FALSE value.
OR(logical 1, logical 2,...)
You can have up to 255 logical tests in an OR function.
When you need to nest logical functions together, be sure to build them slowly, one function at a time.
Nested functions are complex: the arguments, commas, and brackets must be in the right place to prevent
them from either being rejected by Excel or from returning incorrect results.
Another logical function that you will find useful for special situations is IFERROR:
IFERROR(value, value_if_error)
118
3244-1 v1.00 © CCI Learning Solutions Inc.
Formulas and Functions
Lesson 3
If the first argument is determined to be an error value, then the value in the second argument is calculated
and displayed instead. It is typically used with another function, formula, or cell reference nested inside it as
the first argument. For example, suppose you have the following formula in cell A1:
=B1/C1
If cell C1 contained the value 0 (zero), then cell A1 will display #DIV/0 to show that you are trying to divide by
zero, which is an error situation. To avoid displaying the #DIV/0, you can change the formula to:
=IFERROR(B1/C1," ")
#N/A (argument error for a function)
#VALUE (incorrect argument type for a function)
#REF! (invalid cell reference)
#DIV/0 (division by zero)
#NUM! (numeric value expected in a function)
#NAME? (function name is spelled incorrectly)
#NULL (null value returned by a function)
io
Learn the Skill
n
O
The IFERROR function can detect any of the following error conditions:
nl
y
Then if cell C1 contains a zero, then cell A1 will appear as a friendlier-looking blank cell, otherwise it will show
the result of dividing C1 into B1.
at
This exercise is designed to demonstrate the use of the IF, IFERROR, and OR functions to
improve the readability of a worksheet by suppressing the display of error symbols.
Open the Pricing Sheet – Student workbook.
2
Select cell B14 and press
lu
1
.
Fo
r
E
va
The #N/A identifier is now displayed in several cells, all of which depend on the value appearing in cell
B14. Clearly, these error symbols are very distracting on a worksheet, especially since it is difficult to
know in advance how many rows of data will be used.
The IF formula can be used effectively to unclutter this worksheet by displaying a blank cell whenever one of
the input cells for the formula is blank.
3
Select cell E14 and press
4
Change the formula to: =IF(B14="","",A14*D14).
3244-1 v1.00 © CCI Learning Solutions Inc.
to go into edit mode for the cell.
119
Lesson 3
Formulas and Functions
The IFERROR formula can be used to accomplish the same result.
5
Select cell D14 and press
. Change the formula to appear as:
=IFERROR(VLOOKUP(B14,$B$5:$D$8,3,FALSE),"")
Apply the IF formula to the remaining lookup cell for this row.
6
Select cell C14 and press
. Change the formula to appear as:
=IF(B14="","",VLOOKUP(B14,$B$5:$D$8,2,FALSE))
These formulas handle the situation when the cell is blank, so now try an invalid cell entry.
Select cell B14 and enter: A4.
io
n
O
nl
y
7
8
lu
at
Note that cell D14 is the only one of the three modified cells in this row that still shows a blank. The other
two display an error symbol again. This demonstrates that the IFERROR formula is more flexible in
catching all error conditions. You can use either the IF or IFERROR formula, depending on what result you
want to achieve under different conditions.
Select cell B14 and enter: A4353.
9
va
The OR formula can also be inserted to test multiple conditions.
Select cell E14 and press
. Change the formula to: =IF(OR(B14="",A14=""),"",A14*D14).
Now test the result of deleting just the part # field.
.
E
10 Select cell B14, and press
You attain the same result as before.
Now see what happens when you delete the contents of the other cells used in the formula.
Fo
r
11 On the Quick Access Toolbar, click Undo.
12 Select cell A14 and press
.
This demonstrates how the IF and OR formulas can be combined together to achieve a very satisfactory
result.
120
3244-1 v1.00 © CCI Learning Solutions Inc.
Lesson 3
Restore the deleted cell and copy the modified formulas to the other rows.
O
13 On the Quick Access Toolbar, click Undo.
nl
y
Formulas and Functions
14 Select cells C14:E14. Copy the contents of these cells to the cell range C12:E13.
Using Conditional Summary Functions
n
15 Save and close the workbook.
at
io
The conditional summary versions of the commonly used summary functions AVERAGE, COUNT, and SUM are
very powerful extensions of the base functions. Although the function name has an IF in it, the selection
capability works more like filtering: for the given range of cells, Excel first selects only the rows that meet the
criteria and applies the summary function on those rows. The remaining rows are ignored.
lu
AVERAGEIF Calculate the average value of a range of cells in which the criterion value is met. The format of
this function is as follows:
AVERAGEIF(criteria_range, criterion_value , average_range)
The average range is optional. If it is not specified, the criteria range is assumed to be the
average range.
Count the number of cells that contain a non-blank value in a range of cells where the criterion
value is met.
COUNTIF(criteria_range, criterion_value)
SUMIF
Calculate the sum total of all cells containing a numeric value in a range of cells where the
criterion value is met.
SUMIF(criteria_range, criterion_value , sum_range)
The sum range is optional. If it is not specified, the criteria range is assumed to be the sum
range.
Fo
r
E
va
COUNTIF
An example of a conditional summary function is:
=SUMIF(D4:D207,"Visa",F4:F207)
In this function, the criteria range is D4 to D207, the sum range is F4 to F207, and the criterion value is “Visa”;
therefore, Excel will examine each of the cells in the range D4 to D207. If the cell contains the value “Visa,” the
corresponding numeric value in the cell range F4 to F207 will be included in the sum total.
Note that the SUMIF is very different from the more common SUM function. With SUM, the numeric value in
all cells in the sum range are added to the sum total. With SUMIF, the cells are added only if the criterion value
is met.
The above three conditional summary functions permit you to perform only one criteria test. If you need to
perform more than one criteria test at the same time, then a different version is needed.
3244-1 v1.00 © CCI Learning Solutions Inc.
121
Lesson 3
Formulas and Functions
AVERAGEIFS Calculate the average value of a range of cells in which the criterion values are met. The
format of this function is as follows:
AVERAGEIFS(average_range, criteria_range 1, criteria 1, criteria_range 2, criteria 2…)
The average range is mandatory.
COUNTIFS
Count the number of cells that contains a non-blank value in a range of cells where the
criterion values are met.
COUNTIFS(range 1, criteria 1 , range 2, criteria 2…)
Calculate the sum total of all cells containing a numeric value in a range of cells where the
criterion values are met.
nl
y
SUMIFS
SUMIFS(sum_range, criteria_range 1, criteria 1, criteria_range 2, criteria 2…)
The sum range is mandatory.
An example of this kind of conditional summary function is:
O
=SUMIFS(F4:F207,D4:D207,"Visa",F4:F207,">100")
io
n
In this function, the sum range is F4 to F207, the first criteria range is D4 to D207, and its corresponding
criterion value is “Visa”; the second criteria range is F4 to F207 and its corresponding criterion test is >100.
This means that a value in the cell range F4 to F207 is included in the sum total only if both criteria tests are
evaluated as true. For example, the value in cell F4 is included if D4 contains the word “Visa” and F4 contains a
value that is greater than 100. If D4 does not contain the word “Visa,” or if F4 is less than or equal to 100, or
both, then the value in F4 is not included.
lu
Learn the Skill
at
Because these functions have multiple selection criteria, the sequence of the arguments is different from the
single criterion versions of these functions, as described above. The different sequence is necessary to allow
multiple selection criteria to be entered as arguments.
1
va
This exercise demonstrates the use of conditional summary functions.
Open the Customer Sales Rebate – Student workbook.
2
E
Enter text into cells to help identify the function of the first set of conditional formulas.
Enter the following text into cells:
Text
Sales Over $10,000
Fo
r
Cell
F2
F3
F4
Total Sales Over $10,000
Avg Sales Over $10,000
To move quickly to a
cell, press CTRL+G,
which activates the
Go To feature, and
then enter the cell
reference.
Now enter the conditional summary formulas. These formulas are straightforward because they only have
one criterion: that, is any value in column C is greater than $10,000.
122
3244-1 v1.00 © CCI Learning Solutions Inc.
Formulas and Functions
3
Lesson 3
Enter the following formulas into cells:
Cell
G2
G3
G4
Text
=COUNTIF(C2:C26,">10000")
=SUMIF(C2:C26,">10000")
=AVERAGEIF(C2:C26,">10000")
Instead of keying the criteria directly into each of the formulas, you could use a cell reference. For
example, cell D210 could be =COUNTIF(D4:D207,B210). Referencing a cell that contains the selection
criteria makes it easier to change the criteria and avoid forgetting to change a function that contains the
selection criteria.
nl
y
Notice that the SUMIF and AVERAGEIF conditional formulas used here perform their calculations on the same
column in which the selection criteria are applied. In other words, these formulas select only those cells that
meet the stated criteria and then perform the COUNT, SUM, and AVERAGE on only those cells. The
significance of this will become clearer as you examine the next sets of conditional formulas.
Enter the following text into cells:
5
Enter the following formulas into cells:
Text
=COUNTIF(B2:B26,"Corporate")
=SUMIF(B2:B26,"Corporate",C2:C26)
=AVERAGEIF(B2:B26,"Corporate",C2:C26)
lu
Cell
G6
G7
G8
n
Text
Corporate Sales
Total Corporate Sales
Average Corporate Sales
io
Cell
F6
F7
F8
at
4
O
Now enter the next set of conditional summary formulas. These pertain only to rows where the sales type is
“Corporate.”
va
These are the same conditional formulas as used previously, except that an additional argument has been
added to the SUMIF and AVERAGEIF. In this variation, the criteria are applied to the cells in column B
(= “Corporate”), but the SUM and AVERAGE are applied to the corresponding cells in column C, which is
where the sales amounts are located. The average value can be verified by dividing the sum value into the
count value.
E
Now enter the third set of conditional summary formulas. These formulas have two criteria: the sale must be a
Corporate sale and the sales amount must be greater than $10,000. For this exercise, you will also perform the
calculation on a third column. You will recall earlier in this exercise that the rebate is given to a customer only
if the sales amount is more than $10,000.
Enter the following text into cells:
Fo
r
6
Cell
F10
F11
F12
7
Text
Corporate Rebates Total Corporate Rebates
Avg Corporate Rebates
Enter the following conditional summary formulas into cells:
Cell
G10
G11
G12
Text
=COUNTIFS(B2:B26,"Corporate",C2:C26,">10000")
=SUMIFS(D2:D26,B2:B26,"Corporate",C2:C26,">10000")
=AVERAGEIFS(D2:D26,B2:B26,"Corporate",C2:C26,">10000")
Notice that the sequence of the parameters for the sum and average formulas is different in the singlecriteria and multiple-criteria versions.
3244-1 v1.00 © CCI Learning Solutions Inc.
123
Lesson 3
Formulas and Functions
8
Save and close the workbook.
at
Auditing a Worksheet
io
n
O
nl
y
The worksheet should now appear as follows:
lu
va
2.1
2.4
Users automatically assume that spreadsheets are correct and base decisions on the information provided.
Spreadsheet usage is pervasive in business and personal applications, ranging in size from major corporate
investments to individual life insurance policies and everything in between. The impact from errors in
spreadsheets can range from minor inconveniences to major implications on the livelihoods of thousands of
employees. The simple checking of formulas should be performed on any worksheet before it is printed or
saved.
E
Using the Error Checking Tool
Fo
r
Excel has an error checking feature that greatly reduces time spent auditing formulas for accuracy. If
background error checking is enabled, Excel displays a dark green triangle in the upper left corner of a cell to
indicate that it contains an inappropriate formula. Possible errors that Excel will highlight include:
formulas that are inconsistent with others in the same row or column.
formulas that refer to a range but omit a cell that is within or adjacent to the range.
formulas that evaluate to an error.
numbers stored as text.
When you select a cell with a green triangle, a box with an exclamation mark (the Trace Error icon) appears
beside it. Select the button to display a drop-down menu that describes the problem and offers to fix it.
Alternatively, on the Formulas tab, in the Formula Auditing group, click Error Checking.
124
3244-1 v1.00 © CCI Learning Solutions Inc.
Formulas and Functions
Lesson 3
Learn the Skill
This exercise demonstrates how to use Excel’s Error Checking tool to find errors in
formulas.
Open the Rocky Mountains Tour workbook and save it as Rocky Mountains Tour – Student.
at
io
n
O
nl
y
1
Tolano Adventures is using this spreadsheet to compare the revenues to the expenses for a planned
tour. The numbers appear to indicate that a healthy profit will be made.
va
Click File and then click Options. In the Excel Options dialog box, click the Formulas category.
Fo
r
E
2
lu
However, this worksheet has formulas with errors in them. Wherever Excel believes that a formula is
incorrect, it displays an Error Indicator (green triangle at the upper left corner) in the cell. By default, this
background error checking is turned on. You can verify this by looking in the Options dialog box.
3244-1 v1.00 © CCI Learning Solutions Inc.
125
Lesson 3
3
Formulas and Functions
Ensure that the Enable background error checking check box is turned on.
Notice that you can also change the color of the Error Indicator triangle or toggle various error checking
rules on or off.
4
Click the Reset Ignored Errors button and then click OK to close the dialog box.
An error indicator (the small green triangle) is now visible in the upper left corner of cell D21, indicating
that it contains a possible formula error.
Select cell D21 and click the Trace Error icon to the left of this cell.
O
nl
y
5
Look at the Formula Bar for this cell.
io
6
n
At the top row of the Trace Error menu, Excel describes the problem it has identified: the formula in this
cell does not include adjacent cells containing data that you may have wanted to include. At this point,
you should check the contents of the formula bar to determine whether to change this formula.
The formula in this cell is =SUM(D13:D19). However, cells D12 to D20 contain expense numbers.
In the Trace Error menu, click Update Formula to Include Cells.
at
7
If you select Ignore Error, the green triangle disappears and the error is not identified in future error
checks (unless you click Reset Ignored Errors in the Excel Options window).
Click Undo in the Quick Access Toolbar to revert the formula back to its previous value.
lu
8
9
va
Instead of checking each cell one by one, you can use the Error Checking tool to automatically select the next
one.
Select cell A1 or any cell at the top of the worksheet.
E
This step demonstrates how Excel behaves when you use the error checking tool. In fact, it doesn’t
matter where the cell pointer is when you carry out the next step.
10 On the Formulas tab, in the Formula Auditing group, click Error Checking.
Fo
r
The cursor jumps to the first cell that Excel finds with a potential error in it.
Excel has found the formula error again in this cell.
11 Click Update Formula to Include Cells.
126
3244-1 v1.00 © CCI Learning Solutions Inc.
Formulas and Functions
Lesson 3
When Excel can no longer find any problems with formulas, it displays the following:
12 Click OK.
at
io
n
O
nl
y
Your worksheet should now look like the following:
va
13 Save the workbook.
lu
This updated worksheet shows that the profit has been substantially reduced, but there is still a small
profit being made.
Tracing Formula Errors
E
Another method of finding formula errors is to use tracing tools. These tools draw arrows to help you trace
cells that are precedents or dependents of the current cell. By following the lines and dots in the arrows, you
can determine which cells are referenced in formulas.
Fo
r
When you select a cell and trace its precedents, Excel draws lines from other cells leading to the current active
cell (i.e., preceding it). Excel also draws box outlines around these cells. This is a visual way of examining a
worksheet to see which cells are being referenced by formulas. In a complex worksheet with many formulas,
this is a very useful tool to ensure they are all correct.
The reverse can also be done by selecting a cell and tracing its dependent cells; Excel draws lines to any cells
that use the data in the current active cell, directly and indirectly. Dependent cells contain formulas that
reference the current active cell (i.e., depending on it).
You can extend the tracing of precedent or dependent cells by selecting Trace Precedents or Trace
Dependents again in the Ribbon.
3244-1 v1.00 © CCI Learning Solutions Inc.
127
Lesson 3
Formulas and Functions
Learn the Skill
In this exercise, you will use the auditing tools on the Rocky Mountains Tour workbook to
see if there are any other formula errors.
1
If necessary, open the Rocky Mountains Tour – Student workbook.
Start by selecting the most important cell in the entire workbook—the one that calculates the profit of
Revenues less Expenses.
Select cell D23 and then, on the Formulas tab, in the Formula Auditing group, click Trace Precedents.
nl
y
2
3
va
lu
at
io
n
O
Notice the thin line and the dots drawn from cell D9 to D23. The dots in cells D9 and D21 indicate that
these cells are referenced in the formula in cell D23. These appear to be correct.
With cell D23 still selected, click Trace Precedents again.
E
As the Trace Precedents tool drives down through the next layer of detail, Excel draws boxes above cells
D9 and D21. The boxes indicate that these cell ranges are referenced in the formulas in the two cells.
These also appear to be correct.
Click Trace Precedents one more time.
Fo
r
4
Another set of lines and dots are drawn as the Trace Precedents tool drives down through another layer
of detail. These indicate the cells referenced in the formulas entered into the cell range D6:D8.
128
3244-1 v1.00 © CCI Learning Solutions Inc.
Lesson 3
O
nl
y
Formulas and Functions
5
io
n
Looking at the last set of lines and dots drawn, you should see that they do not appear correct. The fare
value in cell B6 is used to calculate the total in cells D6 to D8, but the fares in cells B7 and B8 are not
used at all.
Select cell D7.
at
By selecting cell D7, you can see that the formula is incorrect.
Change the formula in cell D7 to: =B7*C7.
7
Select cell D8 and change the formula to: =B8*D8.
8
Select cell D23 and click Trace Precedents again.
lu
6
Fo
r
E
va
The lines and dots now appear in the correct cells. It also now appears that this tour will incur a loss
instead of a profit.
When you have completed auditing the worksheet, you can remove the arrows.
3244-1 v1.00 © CCI Learning Solutions Inc.
129
Lesson 3
9
Formulas and Functions
On the Formulas tab, in the Formula Auditing group, click Remove Arrows.
Instead of finding the precedent cells, you can find cells containing formulas that depend on the value in a
selected cell, either directly or indirectly. This is the reverse method: tracing dependent cells.
10 Select cell B6 and, on the Formulas tab, in the Formula Auditing group, click Trace Dependents.
11 Click Trace Dependents two more times.
Evaluate Formulas
lu
12 Save and close the workbook.
at
io
n
O
nl
y
The worksheet now appears similar to the following:
Fo
r
E
va
Excel formulas do an excellent job of performing calculations that are sometimes very complex. Even when a
formula is seemingly simple, you may be puzzled about why the result is different than what you expected.
You can use the Evaluate Formula feature to force Excel to slow down and perform each of the internal
calculations in a formula one step at a time. As it performs each step, you can see the intermediate results,
which will help you understand where the data are coming from.
130
3244-1 v1.00 © CCI Learning Solutions Inc.
Formulas and Functions
Lesson 3
The Evaluate Formula dialog box shows the formula that is in the selected cell in the Evaluation text box. An
underline appears under the cell reference (or expression) that is about to be evaluated. You can then choose
one of three buttons:
If the underline appears under a cell reference, press this button to obtain the value from that
cell and display it in the formula. If the underline is under an arithmetical expression, press this
button to perform the arithmetic and display the result.
Step In
If the underline appears under a cell reference, press this button to display the value from that
cell.
Step Out
If you have stepped into a cell to display its value, press this button to step out of the cell.
nl
y
Evaluate
You may find the Evaluate Formula feature difficult to use. It is time-consuming to track every step inside the
formula as it performs each calculation or cell reference. You will most likely have to repeat the evaluation
several times before identifying the errant calculation. As a result, you may want to use the Evaluate Formula
feature only as a last resort (i.e., if you are unable to debug it any other way).
O
Learn the Skill
Open the Travel Miles workbook and save it as Travel Miles – Student.
at
1
io
n
This exercise demonstrates how to use the Evaluate Formula feature.
Select cell C4.
va
2
lu
This worksheet combines the contents of two cells—C1 and C2—to form a sentence, as shown in cell C4.
The intention is to enter different points values in cell C1 for different customer transactions and display
a friendly message from cell C4 on a document, such as an e-mail or statement for the customer.
E
This formula looks very intimidating, as it contains up to three levels of nested functions in some parts.
The purpose of this function is to replace the “XX” in the template wording in cell C2 with the number
from cell C1.
Fo
r
Although there are easier ways of achieving this result, for this exercise we will assume that this is the
optimal method. However, the displayed text in the cell is incorrect because there is an extra “X” still in
place before the value 300. You will need to find out what to fix in the formula to remove that “X”.
3
On the Formulas tab, in the Formula Auditing group, click Evaluate Formula.
The Evaluate Formula dialog box first shows the full formula. The underline under the first cell reference
indicates that it will be the first to be evaluated. The Evaluate button will show the result of that cell
reference as it is translated.
4
Click Evaluate.
3244-1 v1.00 © CCI Learning Solutions Inc.
131
Formulas and Functions
nl
y
Lesson 3
The Evaluation box now shows a current value of ”Travel miles points earned – XX” where C2 used to be.
The underline is now under the next cell reference, which is a reference to cell C2 again. The Evaluation
box helps you by translating the formula piece by piece as it executes each calculation and cell reference.
Pressing the Evaluate button forces Excel to perform one calculation at a time.
Click Evaluate again.
O
5
Click Evaluate again.
io
6
n
The underline is now under FIND(“XX”,”Travel miles points earned – XX”). If you recall your text functions,
you will know that this finds the position of the characters “XX” in the text string and returns the number
representing that position.
Click Evaluate again.
E
va
lu
7
at
The underline is now under MID(”Travel miles points earned – XX”,1,30). The
previous FIND function returned the value 30.
If you lose track
of what the
original formula
looks like, look up
at the Formula
Bar.
Fo
r
The result of the MID function is ”Travel miles points earned – X”. You have now found the location of the
error because the extra “X” appears here. The MID function needs to extract one less character at the far
right end. By looking in the Formula Bar, you will notice that it is the FIND function that calculates the
number of characters to extract. The correction is to subtract 1 from that number.
8
Click Close.
9
If necessary, select cell C4 again. Change the formula to:
=CONCATENATE(MID(C2,1,FIND("XX",C2)‐1),TEXT(C1,"#,##0"))
Notice the “-1” is added at the right of the FIND function.
132
3244-1 v1.00 © CCI Learning Solutions Inc.
Formulas and Functions
Lesson 3
The worksheet should now appear similar to the following:
The text displayed in cell C4 is now correct.
In evaluating this formula, you only used the Evaluate button. There are also the Step In and Step Out
buttons.
nl
y
10 Select cell C4 again and, on Formulas tab, in the Formula Auditing group, click Evaluate Formula.
io
n
O
11 Click Step In.
lu
12 Click Step Out.
at
When you used the Evaluate button earlier, the C2 was simply replaced with the cell value in the
Evaluation box. The Step In button shows you the contents of the cell in C2 in a separate box before
completing that replacement.
13 Click Evaluate seven more times to perform this function.
Fo
r
E
va
The Evaluation window now shows the completed result of the entire formula, and the Evaluate button
has changed to a Restart button.
14 Click Restart.
When you press the Restart button, the evaluation starts over again.
15 Click Close.
16 Select cell C2 and change the text to: Travel miles points you earned today – XX.
17 Select cell C1 and enter: 1500.
3244-1 v1.00 © CCI Learning Solutions Inc.
133
Lesson 3
Formulas and Functions
The displayed text in cell C4 automatically adjusts itself to the new template wording and points value,
because of the flexibility of the function used in that cell.
18 Save and close the workbook.
Manual Checking and Displaying Formulas
As demonstrated earlier, the Error Checking tool is not 100% reliable. For example, if all of the formulas in a
row refer to values in the same incorrect row, Excel will not find the error. Also, Excel ignores inconsistencies if
formulas reference other formulas rather than values. Therefore, you should still manually check formulas for
accuracy.
nl
y
Manually checking a worksheet means selecting every cell in the worksheet to determine if it contains the
right value or formula. If it is a formula that references other cells, you should look and verify that the correct
cells are being referenced. Excel displays cell range references visually when you press
to help you verify
that these formulas are correct.
O
A useful feature to help you review all of the formulas in a worksheet at the same time is the Show Formulas
option. This feature forces every cell to display the formula instead of the final calculated value.
n
Learn the Skill
Open the Rocky Mountains Tour workbook.
Activate the Show Formulas feature.
at
1
io
This exercise demonstrates how to check worksheets to ensure there are no formula
errors.
On the Formulas tab, in the Formula Auditing group, click Show Formulas.
3
If necessary, adjust the size of the Excel workbook window so that you can see the cell range A1:D23.
lu
2
Note the formula in each cell to verify whether it is correct or not.
Select cell D21.
va
4
Fo
r
E
The worksheet should appear as follows:
134
3244-1 v1.00 © CCI Learning Solutions Inc.
Formulas and Functions
Lesson 3
A nice feature in Excel is that the cells referenced in the active cell are highlighted with a colored border.
5
Click on some of the other cells that appear to be incorrect, such as cells D7 and D8.
6
On the Formulas tab, in the Formula Auditing group, click Show Formulas again to turn the formula
display off.
7
Close the workbook and discard any changes made.
nl
y
Lesson Summary
In this lesson, you learned about the different types of functions available in Excel for specific
calculations, how to activate these functions, and how to apply them. You also looked at different
ways of finding and correcting errors in your formulas. You should now be able to:
define what a function is
use information functions
use the correct syntax for functions
use conditional logic and summary functions
insert a function
convert data types
use mathematical and trigonometric
functions
use the Error Checking Tool to mark possible
incorrect formulas
use statistical functions
trace formula errors
use financial functions
use logical functions
use the evaluate formula feature to debug a
formula
use date and time functions
use text functions
at
io
n
O
check the worksheet manually for formula
errors
lu
va
Review Questions
MMM
Go online for
Additional
Review and
Activities
List each of the components of a function, and explain why it is important to ensure that
the syntax of the function is correct.
2.
How is the COUNT function different from COUNTA?
3.
What is the formula for adding 10 days to the current date? Will this formula still be accurate even if
today is December 29?
Fo
r
E
1.
4.
Are the LEFT and MID functions fully interchangeable? In other words, can you always use the LEFT
function instead of MID, as well as using MID instead of LEFT?
5.
Which function would you use to convert a number such as 10 to the text string “ten”?
6.
Describe a situation in which conditional logic functions are useful.
7.
How do conditional summary functions such as SUMIFS or AVERAGEIFS differ from SUM or AVERAGE?
8.
What are some of the suspicious conditions that the Excel Error Checking tool will flag for you?
9.
Why should you check the formulas in your worksheet manually?
10. How can you display all the formulas in a worksheet at once in order to identify all errors in the formulas,
or do you need to check each cell individually?
3244-1 v1.00 © CCI Learning Solutions Inc.
135
Formulas and Functions
Fo
r
E
va
lu
at
io
n
O
nl
y
Lesson 3
136
3244-1 v1.00 © CCI Learning Solutions Inc.
© Copyright 2026 Paperzz