Excel More Functions
Excel More Functions
More Functions
INFOCUS COURSEWARE
47 Greenaway Street
Bulleen Vic Australia 3105
Telephone: (61 3) 9851 4000
Facsimile: (61 3) 9851 4001
Web site: www.watsoniapublishing.com
Product Code ExcelMoreFunctions
Build: 30/06/17
........................................
Trademark Acknowledgments
All terms mentioned in this manual that are known to be trademarks or service marks
have been appropriately acknowledged or capitalised. Watsonia Software cannot
attest to the accuracy of this information. Use of a term in this manual should not be
regarded as affecting the validity of any trademark or service mark.
Screen Shots © 1983-2017 Microsoft. All rights reserved.
Disclaimer
Every effort has been made to provide accurate and complete information. However,
Watsonia Software assumes no responsibility for any direct, indirect, incidental, or
consequential damages arising from the use of information in this document. Data
and case study examples are intended to be fictional. Any resemblance to real
persons or companies is coincidental.
Copyright Notice
This publication is protected in accordance with the provisions of the Copyright Act.
Apart from permissions expressed in the Copyright Act pertaining to copying for
study, review, or research, no part of this publication may be reproduced in any form,
or stored in a database or retrieval system, or transmitted or distributed in any form
by any means, electronic, mechanical photocopying, recording, or otherwise without
written permission from Watsonia Software Pty Ltd.
READ ME FIRST
In case you're not familiar with the terminology, This section contains some important information to
Read Me First is quite often the name given to a help you use this book so we thought we'd start
computer file that contains important information with a Read Me First section.
for people to know prior to using an application.
What skills and knowledge The skills and knowledge acquired in Microsoft Excel 2016 - More
you will acquire... Functions are sufficient to be able to use and operate the software
effectively.
What you'll need to know Microsoft Excel 2016 - More Functions assumes little or no knowledge of
before beginning this the software. However, it would be beneficial to have a general
course... understanding of personal computers and the Windows operating system
environment.
The objectives of this guide… At the completion of this course you should be able to:
use a variety of statistical functions
use logical functions to test whether a statement is true or false
create and use defined names in a workbook
use a range of lookup1and reference functions
use a range of information functions to test worksheet data
What you get in a chapter... Each chapter begins with a summary page listing the topics covered in
that chapter. The chapter then consists of single-page topic sheets
pertaining to the theme of 4the chapter.
What you'll need to have Many of the topics in this learning guide require you to open an existing
before commencing this file with data in it. These files can be obtained from your instructor and
course... need the product code for this course which is ExcelMoreFunctions.
As you work through this It is strongly recommended that you close all open files, if any, prior to
guide… commencing each new chapter in this learning guide. Each chapter,
where relevant, has its own set of exercise files and any from a previous
chapter are no longer required.
Where to from here... Have a look at the next page which explains how a topic page works,
ensure that you have access to the exercise files (see above), and you're
ready to make a start.
1
2
5 6
Topic name
2
Try This Yourself:
Before starting this
Open
On the Sheet1
worksheet, select the
range B5:B10
Click on Count so it
appears without a tick,
then press to hide the
menu
The Count statistics no
longer appear on the
status bar...
4
Repeat steps 3 and 4 to
display Count on the
status bar once more
Press
formula
to complete the
4
Press
formula
to complete the
USING COUNTBLANK
The COUNTBLANK function can be used to example, in a data list that records fees paid, to
count the number of cells in a range that contain indicate the number of unpaid fees. Those cells
no information – that is, the number of empty that do not contain a paid fee value will be blank
cells. COUNTBLANK could be used, for and therefore counted in the calculation.
1
Try This Yourself:
Continue using the
Same File
Press
the formula
to complete 2
USING COUNTIF
You might need to count cells that contain a counting can be achieved with the COUNTIF
specific value or conform to specific guidelines, function. This function counts the number of cells in
such as how many cells have a value greater the range that satisfy the criteria. The criteria can
than 10, or hold a particular label. This type of take the form of a number, text or an expression.
1
Try This Yourself:
Continue using the
Same File
Press
the formula
to complete
USING MODE
The MODE function returns the value that occurs is not applicable. This might be useful if you are
most frequently within a given range. The value analysing test scores and are interested to know
must occur more than once or the MODE which score was the most frequently achieved.
function will return the error #N/A meaning that it
2
Try This Yourself:
Continue using the
Same File
Press to
complete the formula
The error #N/A will 3
appear as there are
no repeating values...
USING MEDIAN
The MEDIAN function returns the number that is in the range are lower and half of the numbers in
in the middle of a selected range of values when the range are higher. This might be useful, for
arranged in ascending or descending order. That instance, when dealing with scores to locate the
is, the point at which exactly half of the numbers midway point.
1
Try This Yourself:
Continue using the
Same File
Press
the formula
to complete
2
The value 20650.5 is
returned. As there are
12 entries in the range
(i.e. an even number,
since one cell contains
text), Excel averages
the two numbers in the
centre of the numbers,
arranged from highest
to lowest. Those two
numbers would be
20608 and 20693...
3
2
Try This Yourself:
Continue using the previous
Same
Press
formula
to complete the
4
Press
Notice the value 32182 is
displayed…
H18
Now for the lowest values...
USING STDEV
The standard deviation measures how widely is calculated using the n-1 method as follows:
values are dispersed from the mean (average)
based on a sample (STDEV.S()) or on the entire
population (STDEV.P()). The standard deviation
2
Try This Yourself:
Continue using the previous
Same
Press
formula
to complete the
USING VAR
The VAR.S function is used to calculate the is often used by statisticians along with the STDEV
variance of numbers from the mean within a function to analyse a list of numbers. Although it is
sample range. The larger the variance, the more possible to manually calculate variance, it is a very
the values vary from the mean. The VAR function lengthy process – the VAR function is instant.
2
Try This Yourself:
Continue using the
Same File
Press to
complete the formula
NOTES:
The IF Function
The IF function is the key logical function used for decision making. It takes the format:
=IF(condition, true, false)
For example, you could use the following formula:
=IF(B2 > 400, “High”, “Low”) where,
B2 > 400 is the condition being tested
(this could be translated as “Is the value in cell B2 greater than 400?”)
“High” is the text to display if B2 is greater than 400 (the result of the test is yes or TRUE)
“Low” is the text to display if B2 is less than or equal to 400 (the result of the test is no or
FALSE)
The OR Function
The OR function is also used to compare more than one condition. It returns TRUE if any of the
conditions are met, and takes the format:
=OR(condition1, condition2,…)
For example, you could use the following formula:
=OR(B2 > 400, C2 < 300) where,
B2 > 400 is the first condition being tested
C2 < 300 is the second condition being tested
This will return the result TRUE if either the value in cell B2 is greater than 400 or the value in cell C2 is
less than 300. The result will be FALSE only if none of the conditions are met.
2
Try This Yourself:
Before starting this exercise
Open
File
Press
formula
to complete the
4
2
Try This Yourself:
Continue using the
Same
Type:
=IF(C7>=$E$2,(C7-
$E$2)*$E$3,0)
This formula tests to see if 3
the monthly sales figure is
greater than or equal to
the target. If it is, then the
difference between the
monthly sales and target
is calculated and this
difference is multiplied by
the 5% commission. If the
monthly sales isn‘t greater
than or equal to the target,
a zero commission is
applicable...
Press
the formula
to complete
4
NESTING IF FUNCTIONS
If you need to make more than one decision of the true component of the IF function. If the
before calculating an answer, you can nest or result of the first condition test is true, the second
embed an IF function inside another IF function. condition will be tested. This structure provides for
For example, you can use an IF function in place three alternative outcomes instead of two.
Double-click in cell E7 to
display the formula
Type (C7-$E$2)*(2*$E$3),
then press + to
create a new line
USING IFERROR
IFERROR is used to trap errors that may occur return the message #DIV/0! which can be a bit
as the result of a calculation and then display alarming for novice users. IFERROR tests a
alternative text or values. For example, if you calculation to see if it works and, if so, performs the
divide a number by zero, Excel will normally calculation. If not, it displays an alternative.
2
Try This Yourself:
Continue using the
Same File
Press
USING AND
The AND function is used to compare the results first and second and third (and so on) conditions
of more than one condition test. It ensures that a must all be true before AND returns the value true.
calculation will not be performed unless all of the This is ideal to use with the IF function to test for a
specified conditions are met. In other words, the collection of conditions.
1
Try This Yourself:
Continue using the
Same File
Press
The result will be TRUE
because both conditions
are satisfied. Now to add
the IF function...
Type (C7-$E$2)*$E$3,0)
Press
USING OR
The OR function is used to compare the results FALSE if all of the condition tests return FALSE.
of more than one condition test. It will return the The OR function is often used in conjunction with
value TRUE if any of the condition tests return the IF function to test a collection of conditions, and
the value TRUE. It will only return the value is easier to work with than nested IF functions.
Click on the OR
Function worksheet tab,
then click in cell E7
Type
=OR(D7="Gold",D7="Sil
ver") 2
Press
The result will be TRUE
because both conditions
are satisfied. Now to add
the IF function…
Type (C7-$E$2)*$E$3,0)
Press
6
USING NOT
Sometimes the best way to get the result you returning the logical opposite of the condition test. If
need is to exclude the values that you don’t want, the condition test returns the value TRUE, the NOT
rather than testing for the values that you do. function will return the value FALSE. This can also
The NOT function is perfect for this situation, be used to great effect with the IF function.
Press twice to
remove the OR function,
2
then change the formula
so it reads
=IF("),C7-$E$2)*$E$3,0)
Press
3
Rules To Follow
There are two important rules to follow when defining names:
1. You can only use letters of the alphabet, numbers, and the underscore character ( _ ) in names.
Spaces and other special characters such as &, * or % are not allowed.
2. Names must not begin with a number. Use a letter or an underscore as the first character of a
name; for example, Year2016 or _2016.
2
Try This Yourself:
Before starting this exercise
Open
File
2
Try This Yourself:
Continue using the previous
Same
Type =sum(Australia)
Press
If you have typed the name
correctly the formula will
now display a calculated
result as though you had 5
typed the formula in the
normal way using cell
references. If your formula
contains an invalid name,
then the error #NAME? will
appear…
3
Try This Yourself:
Continue using the previous
Same
Formatting
2
Try This Yourself:
Continue using the
Same
Press
name
to create the 5
1
Try This Yourself:
Continue using the
Same
Click on Last5Years to
select and move to this
range
This selected range could 2
now be used for a variety
of tasks including copying,
printing, charting, etc…
Click on New_Zealand,
then click on [OK]
1
Try This Yourself:
Continue using the
Same
Click on AUS_Sales,
then click on [OK]
automatically build a
5
formula
Press
formula
to accept the
1
Try This Yourself:
Continue using the
Same
In cell F6 type
=E6*TaxRate
5
Notice how the name
appears in a list of
constants as you type…
Press
the formula
to complete
1
Try This Yourself:
Continue using the
Same
cell B11
7
Click on the Formulas
tab, then click on Define
Name in the Defined
Names group to display
the New Name dialog
box
Type Account_Value in
Name
1
Try This Yourself:
Continue using the previous
Same
Click on Dodgy_Bros in
Name, then click on
[Delete]
Click on Fabulous_Forties
in Name, then click on [Edit]
to display the Edit Name
dialog box
Type Fabulous_Forty in
Name, then click on [OK] to
change the name of the
range name
Click on [Close]
2
Try This Yourself:
Continue using the
Same
NOTES:
Data Area
The data area is often on a worksheet by itself, protecting it
from accidentally being modified or deleted. It holds all of the
possible values for the data. The values are laid out in a table
format and they are listed in numerical or alphabetical order
of the code that the lookup function will search for.
In this example, we have created the name Pay_Rates for
the range B3:C7 that holds the data. The resulting formula in
the calculation area will be easier to understand.
Calculation Area
The calculation area is usually on a worksheet
separate to the data area, unless you require the
data values to be visible as well as the resulting
calculations.
The calculation area uses a formula, such as
VLOOKUP, to find the correct data for each
situation. In this example, the VLOOKUP function
shown is comparing the value in cell C5 with the
values in the range Pay_Rates. It then returns
the value in the second column of the data table,
determined by the 2 in the formula.
USING CHOOSE
The CHOOSE function is designed to allow you position in the list of the item you want, that is, 1
to choose an option from a list of items. It takes being the first item in the list and so on. Range
the format of CHOOSE(lookup-value, list of names are often used for the list items to make the
items) where the lookup-value indicates the function easier to read and comprehend.
Type
=CHOOSE(C5,Rate_1,
Rate_2,Rate_3,Rate_4,Ra
te_5)
Press
4
USING VLOOKUP
The classic lookup function is VLOOKUP – the then looks across the table to the column you have
vertical lookup. This function searches vertically specified to find the value to return. This is ideal for
down a sorted data table looking for a match with looking up numeric values within a range, such as
the lookup-value (or the next lowest value). It tax rates, or commission amounts.
3
Try This Yourself:
Continue using the previous file
Same
File
Press
0% appears because the
Gross Pay is less than $500…
down
3
Try This Yourself:
Continue using the previous
Same
Type =VLOOKUP
(B7,Items_List,2,FALSE)
USING HLOOKUP
Another commonly used lookup function is value (or the next lowest value). It then looks down
HLOOKUP – the horizontal lookup. This the table to the row you have specified to find the
function searches horizontally across a sorted value to return. This can be used to search for text,
data table looking for a match with the lookup- numbers, or logical values.
2
Try This Yourself:
Continue using the previous
Same
Press
The name of the Rate Type
will be returned and
displayed…
USING INDEX
The INDEX function is used to look up values especially useful for two-dimensional tables where
according to specific row and column locations. you want the lookup values to be visible. For
The function requires the location of the lookup example, you may want alternative prices to be
table, and the row and column to look in. This is visible with your price calculator.
2
Try This Yourself:
Continue using the
Same
USING MATCH
The MATCH function looks for an item in a list is needed. For example, you can search for a
and returns the position of that item. MATCH is particular category name in an alphabetical list and
used instead of the other lookup functions when return its location in the list, such as 3 for the 3rd
the position of the item rather than the item itself position or 4 for the 4th position.
2
Try This Yourself:
Continue using the previous
Same
Type MATCH(C15,C4:F4)
Press
The formula looks up the text 5
and returns its position, which
is 4 in this case. This is, in
turn, used by the INDEX
function to locate the correct
hire rate for the given rate
type
Cell References
You are probably comfortable referring to a cell by its cell reference which is a combination of row and
column reference, for example, B1. The B refers to column B and the 1 refers to row 1. Behind the
scene, Excel converts the column reference to the numerical equivalent, so, for example, the contents of
cell B1 would be found in column 2, row 1. Some people even like to use the format R1C2, where this
reference reads as row 1 column 2.
Reference Functions
Reference functions work with the parts of cell references, such as the row reference, or with
complete cell references so that they can locate data or return information about or from cells.
Here is a simple example of some reference functions and an explanation in the table below.
ROW Returns the row number of a reference. In the example above, ROW() returns the
current row number which is 3.
COLUMN Returns the column number of a reference. In the example above, COLUMN()
returns the current column number which is 5.
ADDRESS Returns a reference as text to a single cell in a worksheet. In the example above,
ADDRESS uses the row number in E3 (3) and the column number in E4 (5) to
construct the cell address $E$3.
INDIRECT Returns a reference indicated by a text value. This is often used in conjunction
with ADDRESS to return the value from a specific cell reference created by
ADDRESS. In the example above, INDIRECT refers to the text address created by
ADDRESS in E5, then looks in the cell $E$3 and returns the contents which is 3.
OFFSET Returns a reference offset from a given reference. In the example above, OFFSET
looks at cell E5, then goes to the cell one above (-1) and in the same column (0)
and returns the contents which is 5.
ROWS Returns the number of rows in a reference.
COLUMNS Returns the number of columns in a reference.
AREAS Returns the number of non-contiguous areas in a range. Used for sophisticated
programming.
TRANSPOSE Returns a vertical array of cells as a horizontal array or vice versa. Used for
sophisticated programming.
.
1
Try This Yourself:
Before starting this exercise
Open
File
On the ADDRESSES
worksheet, click in cell A1,
type =ROW() and press
ROWS(reference)
This function returns the number of rows in the
reference.
2
Try This Yourself:
Continue using the
Same
3
Click in cell B1, then drag
the fill handle across to cell
F1 to copy the formula
Like rows, this returns the
column number of the cell
in which it resides...
USING ADDRESS
The ADDRESS function creates a text version of ROW and COLUMN retrieve the two parts of the
a cell address from a given row number and a cell reference separately. ADDRESS combines a
given column number. It’s often used in row reference and a column reference to create a
conjunction with ROW and COLUMN, where cell reference.
1
Try This Yourself:
Continue using the previous
Same
On the ADDRESSES
worksheet, click in cell B2,
type =ADDRESS($A2,B$1,4)
then press and click
back in cell B2
This formula creates the cell 2
reference from the row
number in cell A2 and the
column number in cell B1.
The partial absolute
addresses are used in the
formula to allow it to be
copied to the rest of the
table...
USING INDIRECT
The INDIRECT function returns the reference returned, the contents of the referenced cell are
specified by a text string. Often the text string is displayed. This means that INDIRECT is often used
provided by the ADDRESS function or the ROW to retrieve the contents of a cell located by another
and COLUMN functions. When the reference is function, such as the MAX or MIN.
USING OFFSET
The OFFSET function is used to retrieve a cell or know where the data will be positioned in relation to
range that is a specified number of rows and/or other figures with a known location. OFFSET can
columns from a given cell or range of cells. It is return a single cell or a range of cells.
great for locating information in a list when you
1
Try This Yourself:
Continue using the
Same File
Type
=OFFSET(INDIRECT(
ADDRESS(MATCH(
Max_Read,Readings,0)+
ROW(B3),COLUMN(B3))
)
,0,-1)
then press
In cell F4 type
=OFFSET(INDIRECT(
ADDRESS(MATCH(
3
Min_Read,Readings,0)+
ROW(B3),COLUMN(B3))
)
,0,-1)
then press
Note: If you prefer to write functions using the Function Library on the Formulas tab, the Information
Functions are located in More Functions.
2
Try This Yourself:
Before starting this exercise
Open
File
Type =CELL(A5,$B$2)
The value in column A is the
information we want to return
in relation to the content of cell 5
B2...
Press
formula
to complete the
2
Try This Yourself:
Continue using the
Same File
Type =ISBLANK(A2)
This will test if cell A2 is
completely empty...
Press
the formula
to complete
As to be expected, the 4
result is FALSE...
2
Try This Yourself:
Continue using the
Same File
C2
Type =ISERR(A2)
Press
the formula
to complete
4
Click in cell C2, then
double-click on the fill
handle to copy the
formula down the table
2
Try This Yourself:
Continue using the previous
Same
Type =ISODD(A2)
Press
formula
to complete the
Press
formula
to complete the
2
Try This Yourself:
Continue using the
Same File
F2
Type =ISNUMBER(A2)
Press
the formula
to complete
7
Click in cell F2, then
double-click on the fill
handle to copy the
formula down the table
Press
the formula
to complete
2
Try This Yourself:
Continue using the
Same File
Type =TYPE(A2)
3
Press
formula
to complete the
As cell A2 contains a
number, Excel returns the
value 1 – this is the code
for a numeric type...
CONCLUDING REMARKS
Congratulations!
You have now completed Microsoft Excel 2016 - More Functions. Microsoft Excel 2016 - More
Functions was designed to get you to the point where you can competently perform a variety of
operations.
We have tried to build up your skills and knowledge by having you work through specific tasks.
The step by step approach will serve as a reference for you when you need to repeat a task.