0% found this document useful (0 votes)
7 views

Excel More Functions

Uploaded by

RaeIn Jung
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Excel More Functions

Uploaded by

RaeIn Jung
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 67

Microsoft Excel 2016

More Functions
INFOCUS COURSEWARE

Designed to fast-track you through the process of learning


about computers and information technology, the In Focus
range is a unique and innovative concept in learning.
A quick reference summary of key procedures is provided at
the bottom of each page together with handy tips and
additional information.
Each title in the In Focus series can be used as:
 a classroom workbook for instructor-led teaching and
training;
 a self-study guide for self-paced learning;
 a tutorial guide for distance education programs;
 a resource collection of just-in-time support and
information for help desk users and support staff;
 a handy, desk-side reference for computer users.

This publication has been created using EngineRoom


Desktop™ document management and publishing software
developed by Watsonia Publishing.

Microsoft Excel 2016


More Functions

© 2017 The University of Nottingham


MICROSOFT EXCEL 2016
MORE FUNCTIONS
........................................

Copyright  2017 Melbourne


by Watsonia Software Pty Ltd (ABN 64 060 335 748)
Published by Watsonia Publishing

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.

© 2017 The University of Nottingham The University of Nottingham -i-


Preface
WORKING WITH TOPIC SHEETS
The majority of this book comprises single-page additional reference (optional) material at the
topic sheets. There are two types of topic sheets: bottom. Task sheets contain a Try This Yourself
task and reference. The layout of both is similar step-by-step exercise panel in the detail area as
– an overview at the top, detail in the centre and shown below.

1
2

5 6

 Topic name

 General topic overview provides an introduction to the topic

Try This Yourself (Task-based topic sheets) is a detailed step-by-step practice


 exercise for you to work through. In Reference topic sheets this is usually replaced
by a box with reference information.
In Task topic sheets screen shots and graphics provide a visual clue as to what
 will happen when you work through the Try This Yourself practice exercise. In
Reference topic sheets the screen shots and graphics are used to visually
represent information and concepts.
The For Your Reference (optional) element provides a quick summary of the steps
 required to perform a task. These usually only appear in Task-based topic sheets.
The Handy To Know (optional) element provides additional information such as
 alternate ways of accomplishing a task or further information providing handy tips.

© 2017 The University of Nottingham The University of Nottingham - ii -


Preface
CONTENTS

Chapter 1 Statistical Functions ................................................................................................... 1


Understanding Statistical Functions......................................................................................... 2
Status Bar Statistics ................................................................................................................. 3
Using COUNT And COUNTA .................................................................................................. 4
Using COUNTBLANK .............................................................................................................. 5
Using COUNTIF ....................................................................................................................... 6
Using MODE ............................................................................................................................ 7
Using MEDIAN ......................................................................................................................... 8
Using LARGE And SMALL ...................................................................................................... 9
Using STDEV ......................................................................................................................... 10
Using VAR .............................................................................................................................. 11
Chapter 2 Logical Functions ...................................................................................................... 13
Understanding Logical Functions........................................................................................... 14
Using IF With Text.................................................................................................................. 15
Using IF With Numbers .......................................................................................................... 16
Nesting IF Functions .............................................................................................................. 17
Using IFERROR ..................................................................................................................... 18
Using TRUE And FALSE ....................................................................................................... 19
Using AND ............................................................................................................................. 20
Using OR ................................................................................................................................ 21
Using NOT ............................................................................................................................. 22
Chapter 3 Defined Names ........................................................................................................... 23
Understanding Defined Names .............................................................................................. 24
Defining Names From Worksheet Labels .............................................................................. 25
Using Names In Typed Formulas .......................................................................................... 26
Applying Names To Existing Formulas .................................................................................. 27
Creating Names Using The Name Box .................................................................................. 28
Using Names To Select Ranges ............................................................................................ 29
Pasting Defined Names Into Formulas .................................................................................. 30
Defining Names For Constant Values ................................................................................... 31
Creating Names From A Selection ........................................................................................ 32
Scoping Names To A Worksheet ........................................................................................... 33
Using The Name Manager ..................................................................................................... 34
Documenting Defined Names ................................................................................................ 35
Chapter 4 Lookup Functions...................................................................................................... 37
Understanding Data Lookup Functions ................................................................................. 38
Using CHOOSE ..................................................................................................................... 39
Using VLOOKUP.................................................................................................................... 40
Using VLOOKUP For Exact Matches .................................................................................... 41
Using HLOOKUP ................................................................................................................... 42

© 2017 The University of Nottingham The University of Nottingham - iii -


Preface
Using INDEX .......................................................................................................................... 43
Using MATCH ........................................................................................................................ 44
Understanding Reference Functions ..................................................................................... 45
Using ROW And ROWS ........................................................................................................ 46
Using COLUMN And COLUMNS ........................................................................................... 47
Using ADDRESS.................................................................................................................... 48
Using INDIRECT .................................................................................................................... 49
Using OFFSET ....................................................................................................................... 50
Chapter 5 Information Functions ............................................................................................... 51
Understanding Information Functions .................................................................................... 52
Using The CELL Function ...................................................................................................... 53
Using The ISBLANK Function ................................................................................................ 54
Using The ISERR Function .................................................................................................... 55
Using The ISODD And ISEVEN Functions ............................................................................ 56
Using The ISNUMBER And ISTEXT Functions ..................................................................... 57
Using The TYPE Function ..................................................................................................... 58

© 2017 The University of Nottingham The University of Nottingham - iv -


Preface
Microsoft Excel 2016 - More Functions

CHAPTER 1 STATISTICAL FUNCTIONS


INFOCUS

Excel contains a large number of statistical functions. These can be


used to perform relatively simple operations such as summing,
averaging and finding minimum and maximum values.
They also allow you to perform standard statistical operations such
as calculating standard deviation, variance, the median and the like.

In this session you will:

 gain an understanding of statistical functions


 learn how to use the status bar to view statistics
 learn how to count cells using functions
 learn how to count empty cells in a range
 learn how to count conditionally
 learn how to use the MODE function
 learn how to use the MEDIAN function
 learn how to use the LARGE and SMALL functions
 learn how to estimate the standard deviation
 learn how to use the VAR function.

© 2017 The University of Nottingham Page 1 Chapter 1 - Statistical Functions


Microsoft Excel 2016 - More Functions

UNDERSTANDING STATISTICAL FUNCTIONS


Statistical functions range from the simple SUM reference purposes only, the statistical functions
to highly specialised functions for scientific, are listed below.
engineering and medical applications. In all there
are 98 statistical functions listed in Excel. For

Statistical Functions List


To view the list of available financial functions, click on the Formulas tab, then click on More Functions in the
Function Library group and point to Statistical. This will display a sub-menu which lists the statistical
functions from A-Z. Clicking on a function will open the Function Arguments dialog box. To view more
information on the function you can click on Help on this function in the bottom left corner of the dialog box.
This will open the Excel Help window with detailed and specific information on the function.

AVEDEV F.DIST LOGEST RANK.AVG


AVERAGE F.DIST.RT LOGNORM.DIST RANK.EQ
AVERAGEA F.INV LOGNORM.INV RSQ
AVERAGEIF F.INV.RT MAX SKEW
AVERAGEIFS F.TEST MAXA SKEW.P
BETA.DIST FISHER MEDIAN SLOPE
BETA.INV FISHERINV MIN SMALL
BINOM.DIST FORECAST.ETS ** MINA STANDARDIZE
BINOM.DIST.RANGE FORECAST.ETS.CONFINT ** MODE.MULT STDEV.P
BINOM.INV FORECAST.ETS.SEASONALITY ** MODE.SNGL STDEV.S
CHISQ.DIST FORECAST.ETS.STAT ** NEGBINOM.DIST STDEVA
CHISQ.DIST.RT FORECAST.LINEAR ** NORM.DIST STDEVPA
CHISQ.INV FREQUENCY NORM.INV STEYX
CHISQ.INV.RT GAMMA NORM.S.DIST T.DIST
CHISQ.TEST GAMMA.DIST NORM.S.INV T.DIST.2T
CONFIDENCE.NORM GAMMA.INV PEARSON T.DIST.RT
CONFIDENCE.T GAMMALN PERCENTILE.EXC T.INV
CORREL GAMMALN.PRECISE PERCENTILE.INC T.INV.2T
COUNT GAUSS PERCENTRANK.EXC T.TEST
COUNTA GEOMEAN PERCENTRANK.INC TREND
COUNTBLANK GROWTH PERMUT VAR.P
COUNTIF HARMEAN PERMUTATIONA VAR.S
COUNTIFS HYPGEOM.DIST POISSON.DIST VARA
COVARIANCE.P INTERCEPT PHI VARPA
COVARIANCE.S KURT PROB WEIBULL.DIST
DEVSQ LARGE QUARTILE.EXC Z.TEST
EXPON.DIST LINEST QUARTILE.INC

** Statistical functions new to Microsoft Excel 2016.

© 2017 The University of Nottingham Page 2 Chapter 1 - Statistical Functions


Microsoft Excel 2016 - More Functions

STATUS BAR STATISTICS


An area of statistical information that is often worksheet or workbook. This means you can
overlooked is the status bar. The status bar can access statistical information quickly without having
be configured to perform statistical analysis on to create formulas especially for the purpose. It is
cells and ranges that are selected in the ideal for cross-checking totals and other results.

2
Try This Yourself:
Before starting this
Open

exercise you MUST open


File

the file Statistical


Functions_1.xlsx...
3

 On the Sheet1
worksheet, select the
range B5:B10

 Read the statistical


calculations that should
appear in the status bar at
the bottom of the screen
This is a very quick and
easy way to view the
Sum, Average and Count
statistics for selected
cells...

 Right-click on the status


bar to display the shortcut
menu
There are a number of
options that you can hide
or display on the status
bar...

 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

For Your Reference… Handy to Know…


To use the status bar calculations:  The other statistical function options
1. Select the cells available in the Status bar shortcut menu
are: Numerical Count (COUNT), Minimum
2. Read the figure shown in the status bar
(MIN) and Maximum (MAX).
3. Right-click on the status bar to display a
shortcut menu of options  The Count (COUNTA) option shown in the
status bar, counts the number of cells that
4. Click on an option to show/hide it contain a value (be it numerical or text).

© 2017 The University of Nottingham Page 3 Chapter 1 - Statistical Functions


Microsoft Excel 2016 - More Functions

USING COUNT AND COUNTA


Two of the main functions for counting cells are including text. For example, if the range is A1:A10
COUNT and COUNTA. COUNT counts the and cell A5 contains the text ‘On Hold”, COUNT will
number of values in a range excluding text while count 9 cells (as it won’t count cell A5), while
COUNTA counts the number of values in a range COUNTA will count 10 (as it will count cell A5).

Try This Yourself:


Continue using the previous
Same

file with this exercise, or open


File

the file Statistical


Functions_2.xlsx...

 Click in cell B13, then type


=COUNT(B5:N5)

 Press
formula
to complete the
4

 Click in cell C13, then type


=COUNTA(B5:N5)

 Press
formula
to complete the

Currently, both of the results


are the same – let’s delete a
cell in the range...

 Click in cell C5, then press

Both Count formulas return


12 because empty cells are
not included in either 6
calculation...

 Click in cell F5, type Closed,


then press
Now the formulas return
different values, as text is
only counted by the COUNTA
function...

 Select B13:C13, then double-


click on the fill handle to copy
the formula down and across
to cell C18
7

For Your Reference… Handy to Know…


To use the COUNT function:  A blank cell is seen as a text value and will
1. Click in a cell, then type =COUNT(range) therefore be included by COUNTA but not
2. Press COUNT.
To use the COUNTA function:
1. Click in a cell, then type =COUNTA(range)
2. Press

© 2017 The University of Nottingham Page 4 Chapter 1 - Statistical Functions


Microsoft Excel 2016 - More Functions

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

previous file with this


exercise, or open the file
Statistical
Functions_3.xlsx...

 Click in cell D13, then


type
=COUNTBLANK(B5:N5
)

 Press
the formula
to complete 2

The result 1 will be


displayed – this is
because there is no
value in cell C5...

 Click in cell D13, then


double-click on the fill
handle to copy the
formula down to cell
D18

For Your Reference… Handy to Know…


To use the COUNTBLANK function:  When using the COUNTBLANK function,
1. Click in a cell cells with zero values are not counted.
2. Type =COUNTBLANK(range)
3. Press

© 2017 The University of Nottingham Page 5 Chapter 1 - Statistical Functions


Microsoft Excel 2016 - More Functions

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

previous file with this


exercise, or open the file
Statistical
Functions_4.xlsx...

 Click in cell E13, then


type
=COUNTIF(B5:N5,">300
00")
In this example we will
count only the Tuesdays 2
where the takings
exceeded $30,000...

 Press
the formula
to complete

The number of days is


2...

 Click in cell E13, then


double-click on the fill
handle to copy the
formula down to cell E18

For Your Reference… Handy to Know…


To use the COUNTIF function:  If you wish to count cells that contain a
1. Click in a cell specific value or conform to specific
guidelines across multiple ranges, you can
2. Type =COUNTIF(range, criteria)
use the COUNTIFS function.

© 2017 The University of Nottingham Page 6 Chapter 1 - Statistical Functions


Microsoft Excel 2016 - More Functions

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

previous file with this


exercise, or open the
file Statistical
Functions_5.xlsx...

 Click in cell F13 and


type =MODE(B5:N5)

 Press to
complete the formula
The error #N/A will 3
appear as there are
no repeating values...

 Click in cell C5 and


type 17200, then
press
The Mode value now
changes to 17200 as
the value appears
twice in the range
indicated...

 Click in cell F13 and


double-click on the fill
handle to copy the
4

formula down to cell


F18
All of the remaining
Mode values will be
represented by the
error #N/A

For Your Reference… Handy to Know…


To use the MODE function:  When using the MODE function, any cells in
1. Click in a cell the selected range that do not contain values
are ignored. However, cells that contain a
2. Type =MODE(range)
zero (0) value are included.
3. Press
 The related functions MEDIAN and
AVERAGE are also commonly used, along
with MODE, when working with scores.

© 2017 The University of Nottingham Page 7 Chapter 1 - Statistical Functions


Microsoft Excel 2016 - More Functions

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

previous file with this


exercise, or open the
file Statistical
Functions_6.xlsx...

 Click in cell G13 and


type =MEDIAN(B5:N5)

 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

 Click in cell G13, then


double-click on the fill
handle to copy the
formula down to cell
G18

For Your Reference… Handy to Know…


To use the MEDIAN function:  When using the MEDIAN function, if there is
1. Click in a cell and type =MEDIAN(range) an even number of numbers in the selected
range, the function will calculate the average
2. Press
of the two numbers in the middle of that
range.

© 2017 The University of Nottingham Page 8 Chapter 1 - Statistical Functions


Microsoft Excel 2016 - More Functions

USING LARGE AND SMALL


The LARGE and SMALL functions enable you to use the LARGE function. This might be useful in a
locate values based on their relative standing data list recording sales, to locate the first, second
within the selected range. For instance, if you and third highest sales in a month. The SMALL
want to find the second highest value, you could function enables you to locate the smallest values.

2
Try This Yourself:
Continue using the previous
Same

file with this exercise, or


File

open the file Statistical


Functions_7.xlsx...

 Click in cell H13, then type


=LARGE(B5:N5,1)
This will locate the highest
sale recorded for Tuesdays...

 Press
formula
to complete the
4

The value 32991 is returned.


But what if we want the
second highest value?

 Click in cell H13, double-click


on the 1 in the Formula Bar,
then type 2

 Press
Notice the value 32182 is
displayed…

 Click in cell H13, then


double-click on the fill handle
to copy the formula to cell
7

H18
Now for the lowest values...

 Click in cell I13, type


=SMALL(B5:N5,3), then
press to return the third
lowest value

 Repeat step 5 to copy the


formula from cell I13 down to
cell I18

For Your Reference… Handy to Know…


To use the LARGE or SMALL function:  When using the LARGE and SMALL
1. Click in a cell functions, if the argument k is less than or
equal to zero, or greater than the number of
2. Type =LARGE(range,# largest value
selected cells, a #NUM! error is returned.
within range), or
Type =SMALL(range, # smallest value
within range)

© 2017 The University of Nottingham Page 9 Chapter 1 - Statistical Functions


Microsoft Excel 2016 - More Functions

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

file with this exercise, or


File

open the file Statistical


Functions_8.xlsx...

 Click in cell J13, then type


=STDEV.S(B5:N5)

 Press
formula
to complete the

The STDEV.S function


3
should only be used with a
sample of the population. If
your data includes the entire
population, as is the case
with our worksheet, you
should use STDEV.P...

 Click in cell J13, then modify


the formula in the Formula
Bar so that it reads
=STDEV.P(B5:N5)

 Press to complete the


formula and see the revised
5
calculation

 Click in cell J13, then


double-click on the fill handle
to copy the formula down to
cell J18

For Your Reference… Handy to Know…


To use the STDEV function for a sample:  The STDEVA function also estimates the
 Click in a cell and type =STDEV.S(range) standard deviation based on a sample, but
includes text and logical values (TRUE and
To use the STDEV function for an entire
FALSE – where TRUE has a value of 1 and
population:
text and FALSE have a value of 0).
 Click in a cell and type =STDEV.P(range)

© 2017 The University of Nottingham Page 10 Chapter 1 - Statistical Functions


Microsoft Excel 2016 - More Functions

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

previous file with this


exercise, or open the
file Statistical
Functions_9.xlsx...

 Click on the Variance


worksheet tab to make
this the active
worksheet
Variance is commonly
applied to test scores
to determine how
much the values vary
from the mean...

 Click in cell D21, then


type =VAR.S(A4:A20) 3

 Press to
complete the formula

For Your Reference… Handy to Know…


To use the VAR function for a sample:  The variance is a squared number, so it can
1. Click in a cell prove tricky to interpret this value in relation
to the mean. Because of this, statisticians
2. Type =VAR.S(range)
calculate the square root of the variance and
this is called the standard deviation.

© 2017 The University of Nottingham Page 11 Chapter 1 - Statistical Functions


Microsoft Excel 2016 - More Functions

NOTES:

© 2017 The University of Nottingham Page 12 Chapter 1 - Statistical Functions


Microsoft Excel 2016 - More Functions

CHAPTER 2 LOGICAL FUNCTIONS


INFOCUS

Logical functions are used in worksheets to test whether a situation


is true or false. Depending on the result of that test, you can then
choose to perform an action such as display information, perform
different calculations or perform further tests.

In this session you will:

 gain an understanding of logical functions


 learn how to use IF with text
 learn how to use IF with numbers
 learn how to nest IF functions
 learn how to use IFERROR
 learn how to use TRUE and FALSE
 learn how to use the AND function
 learn how to use the OR function
 learn how to use the NOT function.

© 2017 The University of Nottingham Page 13 Chapter 2 - Logical Functions


Microsoft Excel 2016 - More Functions

UNDERSTANDING LOGICAL FUNCTIONS


Logical functions provide decision-making tools required figure or value. You can then use the IF
for information in a spreadsheet. They allow you logical function to determine which calculation to
to look at the contents of a cell or to perform a perform or action to take depending on the
calculation, and then test that result against a outcome of the test. Here are some examples.

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 AND Function


The AND function is used to compare more than one condition. It returns TRUE only if all of the
conditions are met, and takes the format:
=AND(condition1, condition2,…)
For example, you could use the following formula:
=AND(B2 > 400, C2 < 300) where,
B2 > 400 is the first condition being tested
C2 < 300 is the second condition being tested
This will only return the result TRUE if the value in cell B2 is greater than 400 and the value in cell C2 is
less than 300. In all other situations, the result will be 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.

© 2017 The University of Nottingham Page 14 Chapter 2 - Logical Functions


Microsoft Excel 2016 - More Functions

USING IF WITH TEXT


The IF function can be used to display different function resides. In this example, the IF function is
information depending on the outcome of a used to indicate whether adjacent sales figures
conditional test. The resulting text will appear in meet or exceed a specified target. This makes
the cell where the formula containing the IF identifying successful sales people far easier.

2
Try This Yourself:
Before starting this exercise
Open
File

you MUST open the file


Logical Functions_1.xlsx...

 Click on the IF Function


worksheet tab

 Click in cell D7, then type:


=IF(C7>$E$2,"Exceeded
Target","Below Target")

 Press
formula
to complete the
4

 Click in cell D7, then


double-click on the fill
handle to copy the formula
down the column
Notice that the result for
Jerry Hancock is Below
Target even though he
achieved 34,000. This is
because the condition
requires the sales to be
greater than the target.
We’ll change it to greater
than or equal to the target...
7

 Click in cell D7, then click in


the Formula Bar
immediately to the right of >

 Type =, then press

 Click in cell D7, then


double -click on the fill
handle to copy the formula
down the column

For Your Reference… Handy to Know…


To use the IF function to create decision  If you only want text to appear if the result is
making: true, you can enter "" (two double quotes) in
=IF(test, value_if_true, value_if_false) the position for false. For example,
=IF(C7>=$E$2,"Exceeded Target","") will
This function performs a test, then if the result
only display text if the target was met or
is true, uses the entry in the position true. If the
exceeded.
result is not true, the entry for false is used.

© 2017 The University of Nottingham Page 15 Chapter 2 - Logical Functions


Microsoft Excel 2016 - More Functions

USING IF WITH NUMBERS


One of the most common uses of the IF function be used to calculate values in place of the true and
is to perform numerical computations based on false components in the function. You can also use
the outcome of the condition test. This is this structure to show a specific value according to
achieved by putting formulas that would normally the result of the condition test.

2
Try This Yourself:
Continue using the
Same

previous file with this


File

exercise, or open the file


Logical Functions_2.xlsx...

 Ensure the IF Function


worksheet tab is selected,
then click in cell E7

 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

 Click in cell E7, then


double-click on the fill
handle to copy the
formula down
We formatted column E
before you opened the
workbook – that’s why the
dash symbol appears
instead of zero where no
commission is to be paid

For Your Reference… Handy to Know…


To use the IF function to create decision making  The true_value and false_value in an IF
with numeric values: function can be mixed with one text and the
=IF(test, value_if_true, value_if_false) other a numeric.
The true-value and the false-value both need to
be numeric here. They could be a value, a cell
reference, or even another (nested) formula.

© 2017 The University of Nottingham Page 16 Chapter 2 - Logical Functions


Microsoft Excel 2016 - More Functions

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.

Try This Yourself:


Continue using the previous
Same

file with this exercise, or open


File

the file Logical


Functions_3.xlsx...

 Double-click in cell E7 to
display the formula

 Click after the first equal sign,


type IF(C7>=(2*$E$2), then
press + to create a
new line
You don’t have to put a new 5
line in the Formula Bar for the
formula to work but it does
make it easier to work with
complex formulas…

 Type (C7-$E$2)*(2*$E$3),
then press + to
create a new line

 Click immediately after the first


comma on the last line, then
press + to create a
new line

 Again, click immediately after


the first comma on the last
line, then press +
Your formula is now divided 7
into components. Let’s
complete the formula…

 Press to move to the end


of the formula, then type )

 Press , click in cell E7


then click and drag the fill
handle down to cell E15

For Your Reference… Handy to Know…


To nest one IF inside another:  When you create nested formulas, Excel will
1. Double-click on the formula cell colour-code the paired brackets to make it
easier to see what you are doing. The
2. Click at the desired location in the formula
outside brackets are coloured black.
either in the Formula bar or in the cell being
edited  You can nest any function within another
function, but plan carefully.
3. Type the additional requirements

© 2017 The University of Nottingham Page 17 Chapter 2 - Logical Functions


Microsoft Excel 2016 - More Functions

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

previous file with this


exercise, or open the
file Logical
Functions_4.xlsx...

 Click on the IFERROR


Function worksheet
tab, then click in cell E7

 Type the following


=IFERROR(C7/D7,
"First Year")
4
 Press

 Click in cell E7, then


double-click on the fill
handle to copy the
formula down the
column
Instead of giving an
error where the divisor
is zero, Excel displays
the text “First Year” in
the cell

For Your Reference… Handy to Know…


IFERROR(calculation, error_value)  When using IFERROR you can use text as
This function performs the calculation and if the entry to be displayed if an error is
there are no errors, displays the result of the located, but you could just as easily display
calculation. If an error does occur, it displays the nothing using "" (two double quotes) or
error_value. perform an alternative calculation.

© 2017 The University of Nottingham Page 18 Chapter 2 - Logical Functions


Microsoft Excel 2016 - More Functions

USING TRUE AND FALSE


TRUE and FALSE are logical values. The result entered as values, which are TRUE and FALSE, or
of a logical test is either true or false and Excel as formulas with no parameters, which are
allows you to enter these values in cells or test =TRUE() and =FALSE(). The value TRUE and the
for them in functions. TRUE and FALSE can be formula =TRUE() are treated as identical by Excel.

Try This Yourself:


Continue using the
Same File

previous file with this


exercise, or open the
file Logical
Functions_5.xlsx...

 Click on the AND


Function worksheet
tab, then click in cell D7

 Type the TRUE and


FALSE entries in the
column as shown
2

 Click in cell E7, then


type =IF(C7>=$E$2,
IF(D7=TRUE,
(C7-$E$2)*$E$3,0),0)

 Press

 Click in cell E7, then


double-click on the fill
handle to copy the
formula down the
column 3

For Your Reference… Handy to Know…


TRUE  TRUE is used to make formulas more
The logical value TRUE readable. For instance, you could write the
formula, =IF(C7>=$E$2, IF(D7=TRUE,
FALSE
(C7-$E$2)*$E$3,0),0) as
The logical value FALSE =IF(C7>=$E$2,IF(D7,(C7-$E$2)*$E$3,0),0),
however including TRUE in the first example
makes the formula easier to understand.

© 2017 The University of Nottingham Page 19 Chapter 2 - Logical Functions


Microsoft Excel 2016 - More Functions

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

previous file with this


exercise, or open the file
Logical
Functions_6.xlsx...

 Ensure the AND


Function worksheet is
selected, click in cell E7,
then type:
=AND(C7>=$E$2,D7=T
RUE)
5

 Press
The result will be TRUE
because both conditions
are satisfied. Now to add
the IF function...

 Double-click in cell E7,


click after the first equal
sign, then type IF(

 Press to move to the


end of the formula, type ,
(comma), then press
+ to create a new
line 7

 Type (C7-$E$2)*$E$3,0)

 Press

 Click in cell E7, then


double-click on the fill
handle to copy the
formula down the
column

For Your Reference… Handy to Know…


AND(logical1, logical2,…)  A condition in an AND function can simply be
This function tests the logical value of each a reference to a cell holding a logical value
entry e.g. logical1. If they are all true, it will (that is, TRUE or FALSE). For example,
return the value TRUE. If any one of them is =AND(B2,C2) will return the value FALSE if
false, the function will return FALSE. cell B2 and/or cell C2 contain the text
FALSE.

© 2017 The University of Nottingham Page 20 Chapter 2 - Logical Functions


Microsoft Excel 2016 - More Functions

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.

Try This Yourself:


Continue using the
Same File

previous file with this


exercise, or open the file
Logical
Functions_7.xlsx...

 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…

 Double-click in cell E7,


click after the first equal
sign, then type IF(

 Press to move to the


end of the formula, type ,
(comma), then press
+ to create a new
line

 Type (C7-$E$2)*$E$3,0)

 Press
6

 Click in cell E7, then


double-click on the fill
handle to copy the
formula down the column

For Your Reference… Handy to Know…


OR(logical1, logical2,…)  If you want to find data that meets more than
This function tests the specified logical one condition you can use the AND function
conditions or cell references. If any one of the and the OR function together.
conditions is true, it will return the value TRUE.
If all of them are false, the function will return
FALSE.

© 2017 The University of Nottingham Page 21 Chapter 2 - Logical Functions


Microsoft Excel 2016 - More Functions

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.

Try This Yourself:


Continue using the
Same File

previous file with this


exercise, or open the file
Logical
Functions_8.xlsx...

 Ensure the OR Function


worksheet is selected,
double-click in cell E7,
then click before OR

 Press twice to
remove the OR function,
2
then change the formula
so it reads
=IF("),C7-$E$2)*$E$3,0)

 Add the NOT function so


that the formula now
reads
=IF(NOT(D7="Bronze"),
(C7-$E$2)*$E$3,0)
This excludes any of the
Bronze sales agents,
therefore selecting Silver
and Gold…

 Press
3

 Click in cell E7, then


double-click on the fill
handle to copy the
formula down the column
The results are the
same, we’ve just tested
the contents of the cells
in a slightly different way

For Your Reference… Handy to Know…


NOT(logical)  If you want to pay commission to Gold and
This function tests the specified logical Silver agents only if they exceed the target
condition or contents of a cell. If the condition is (to avoid paying negative commission), you
true, it will return the value FALSE. If the can use:
condition is false, the function will return TRUE. =IF(AND(C7>=$E$2,
NOT(D7=”Bronze”)),(C7-$E$2)*$E$3,0)

© 2017 The University of Nottingham Page 22 Chapter 2 - Logical Functions


Microsoft Excel 2016 - More Functions

CHAPTER 3 DEFINED NAMES


INFOCUS

When inserting data in a worksheet that you will refer to in the


future, it can be difficult to find a way of remembering where that
data is contained. Fortunately, you can assign names to cells or
ranges to make it easier to find or refer to them later on. These are
called Defined Names. For instance, you may have entered budget
assumptions for the previous year in the range A4:D4 in the
Forecast worksheet. Rather than having to remember the range,
you can assign a logical name to the data, such as Assumptions.
These names can be used instead if cryptic range addresses for
selecting and working on the data located in a range. The names
can also be used in formulas to make them more readable and
understandable.

In this session you will:

 gain an understanding of how and where defined names


are used
 learn how to create defined names using existing text
labels
 learn how to use Defined Names in new formulas
 learn how to apply names to existing formulas
 learn how to create range names using the Name box
 learn how to use defined names to select and navigate to
ranges
 learn how to paste defined names into formulas
 learn how to create constants in Excel
 learn how to create names from a selection in the
worksheet
 learn how to create defined names that are scoped to a
specific worksheet
 learn how to use the defined name Name Manager
 learn how to paste a list of defined names into the
worksheet.

© 2017 The University of Nottingham Page 23 Chapter 3 - Defined Names


Microsoft Excel 2016 - More Functions

UNDERSTANDING DEFINED NAMES


Defined names are labels that you can assign to cryptic range address – for example, =SUM(Qtr1)
a cell or range in a worksheet. They are designed is a lot easier to understand than =SUM(A5:A62).
to make working with that cell or range easier. Names can also be used to select ranges for
You can use a name in a formula instead of a printing, graphing, copying and the like.

Names Defined From Labels


The term label usually refers to text that you have typed in a cell. If the text appears next to a continuous
list of values, Excel can see the label as a ‘tag’ that represents that range of values. The label can then
be used in formulas instead of direct cell references. If you have used numbers as ‘labels’, such as the
year 2016, Excel allows you to define these as labels too.

Here the label Australia, typed originally in cell


B5, is being used as the defined name for the
vertical range B6:B10. You can see it in the
Name box at the top left above column A.
Similarly, the label Year 1, typed originally in
cell A6, could be used as the defined name for
the horizontal range B6:D6.
Interestingly, Excel allows more than one
defined name to be assigned to a cell, a range,
or overlap another named area.

Names Defined By Typing


If you want to create a tag that refers to a range of cells holding values and text, or that you can use in
formulas on other worksheets, you can type your own defined name. These are the same as labels
except that the name has to be specified against a particular range, and does not usually appear in the
worksheet. Names can be used to refer to cells in other worksheets or in other workbooks. They can
even be used to represent a fixed value (referred to as a constant) rather than a range of cells. For
example, if you need to use a constant value in your calculations, but don’t want the value to appear in
the worksheet in case it is accidentally changed, you can define a name and assign it a value. For
example, Tax could represent the value 10%.

Providing the label has been applied to a


formula, any formula that encompasses the
exact area of a defined name will appear in the
formula bar using the name in lieu of the range
or cell address. Notice that the formula here
reads =SUM(Australia) rather than
=SUM(B6:B10).
The Name box (at the top left) shows that cell
B12, which contains the formula, has been
named as TotalForAustralia – this doesn’t
appear as a label in the worksheet and has
been typed in as a defined name.

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.

© 2017 The University of Nottingham Page 24 Chapter 3 - Defined Names


Microsoft Excel 2016 - More Functions

DEFINING NAMES FROM WORKSHEET LABELS


Excel assumes that there will be many occasions can use it as a tag to refer to the values. This can
where the text typed in a worksheet describes the be done using the Define Name command in the
values to which it is adjacent. If you have typed a Defined Names group on the Formulas tab.
text label next to a continuous list of values, you

2
Try This Yourself:
Before starting this exercise
Open
File

you MUST open the file


Defined Names_1.xlsx...

 Click on the Past 5 Years


worksheet tab and spend a
few moments studying the
data

 Click in cell B6, hold down


, then click in cell B10
to select the range B6:B10

 Click on the Formulas tab,


then click on Define Name
in the Defined Names
3 The Refers to text
box refers to the
group to display the New
location of the
Name dialog box defined name.
Notice how Excel has used Notice how defined
the text label from cell B5 names are absolute
(as indicated by
as the assumed name for
both the worksheet
the range… name and the dollar
signs).
 Click on [OK] to accept the
default settings
The new name will appear
in the Name box… 4

 Repeat the above steps


and create the following
names:
Name Range
UK C6:C10
New_Zealand D6:D10
Year_1 B6:D6
Year_2 B7:D7
Year_3 B8:D8
Year_4 B9:D9
Year_5 B10:D10

For Your Reference… Handy to Know…


To define a name from a worksheet label:  If there are spaces in the labels (such as
1. Select the cell or range adjacent to the label between words) Excel will replace these with
an underscore character. This occurs
2. Click on the Formulas tab, then click on
because spaces are not permitted in Defined
Define Name in the Defined Names group
Names.
3. Click on [OK]

© 2017 The University of Nottingham Page 25 Chapter 3 - Defined Names


Microsoft Excel 2016 - More Functions

USING NAMES IN TYPED FORMULAS


Once names have been defined within a formula Excel checks its internal listing. If the name
worksheet or workbook they can be used when is there, Excel will use it to reference the
typing formulas. Defined names are stored within appropriate cells and calculate the formula.
the workbook so that when a name is typed into a

2
Try This Yourself:
Continue using the previous
Same

file with this exercise, or


File

open the file Defined


Names_2.xlsx...

 Click in cell B12

 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…

 Type the following formulas:


Cell Formula
C12 =sum(UK)
D12 =sum(New_Zealand)

 Click back in cell B12


Notice how the formula
appears in the Formula Bar

For Your Reference… Handy to Know…


To use a defined name in a new formula:  If you attempt to type a name that Excel
 Type the formula in the normal way and type doesn’t recognise, the #NAME? error
the range name instead of the range address message will appear in the cell.
 Range names are not case sensitive so you
can type them in either uppercase or
lowercase.

© 2017 The University of Nottingham Page 26 Chapter 3 - Defined Names


Microsoft Excel 2016 - More Functions

APPLYING NAMES TO EXISTING FORMULAS


Names are often defined within a workbook after Fortunately, Excel allows you to apply defined
many of the formulas have already been entered. names to existing formulas without having to edit or
It would be a pain to have to re-create the re-type the formulas into the workbook.
formulas using newly defined range names.

3
Try This Yourself:
Continue using the previous
Same

file with this exercise, or


File

open the file Defined


Names_3.xlsx...

 Click in cell E6, type


=SUM(B6:D6), then press

 Click in cell E6, then click


and drag the fill handle to cell
E12

 Point to the AutoFill icon,


click on the drop arrow, then
click on Fill Without
6

Formatting

 Click on cell E11, then press


to delete the formula

 Click in cell A5, hold down


, then click in cell E12 to
select the range A5:E12

 Click on the Formulas tab,


click on the drop arrow for
Define Name in the Defined
Names group, then select 8
Apply Names

 Click on all of the names until


they are selected, then click
on [OK] to apply the selected
names to formulas in the
selected range

 Click on the formulas in the


worksheet and notice how
names have been inserted in
lieu of cell addresses

For Your Reference… Handy to Know…


To apply names to existing formulas:  The Apply Names command is also a handy
1. Select the range containing the formulas way of refreshing range names.
2. Click on the Formulas tab, click on the drop
arrow for Define Name in the Defined
Names group, then click on Apply Names
3. Select the names to apply and click on [OK]

© 2017 The University of Nottingham Page 27 Chapter 3 - Defined Names


Microsoft Excel 2016 - More Functions

CREATING NAMES USING THE NAME BOX


Names are defined to represent individual cells, the cell(s) and then typing the name in the Name
ranges of cells, or specific values. Names can be box. The Name box is located below the toolbars
used in formulas and to re-select cells. A quick and to the left of the Formula Bar.
way to create a name for a range is by selecting

2
Try This Yourself:
Continue using the
Same

previous file with this


File

exercise, or open the file


Defined Names_4.xlsx...

 Click on cell A1, hold


down , then click in
cell E12 to select the
range A1:E12

 Click in the Name box,


then type Last5Years

 Press
name
to create the 5

 Click on the Australia


worksheet tab, then click
in cell B13

 Click in the Name box,


type AUS_Sales, then
press

 Repeat steps 4 and 5


and create the names
as shown

6 Worksheet Cell Name


United Kingdom B13 UK_Sales
New Zealand B13 NZ_Sales

For Your Reference… Handy to Know…


To use the Name box to create defined names:  If you use the Name box and type in a name
1. Select the range in the worksheet to name that already exists as a Defined Name,
Excel will think you want to navigate to that
2. Click in the Name box
range and will position the cell pointer in that
3. Type the desired name and press range. Excel usually doesn’t allow duplicated
names in a workbook.

© 2017 The University of Nottingham Page 28 Chapter 3 - Defined Names


Microsoft Excel 2016 - More Functions

USING NAMES TO SELECT RANGES


Names can be used in a variety of ways. They that you can define ranges for printing or charting,
can be used to refer to a range of cells on which for example, and return to them just by selecting
you want to perform a calculation. You can also their name. This is ideal when you need to print
use them to reselect an area easily. This means specific selections of cells.

1
Try This Yourself:
Continue using the
Same

previous file with this


File

exercise, or open the file


Defined Names_5.xlsx...

 Click on the drop arrow of


the Name box to see a list
of names that have been
created

 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 the Name box


drop arrow and click on
UK_Sales

 Click on the Name box


drop arrow again and click
on Australia
You can also use the Go
To box and defined names
to navigate the
workbook…
5

 Click on the Home tab,


click on Find & Select in
the Editing group, then
click on Go To to display
the Go To dialog box

 Click on New_Zealand,
then click on [OK]

For Your Reference… Handy to Know…


To use defined names to select areas:  Single-cell defined names are a good way of
1. Click on the Name box drop arrow navigating to specific locations in large and
complex workbooks. For example, if you
2. Click on the desired range name
name the top cell of your budget data
BudgetData you can use the Name box
drop arrow or Go To to navigate to that
specific location.

© 2017 The University of Nottingham Page 29 Chapter 3 - Defined Names


Microsoft Excel 2016 - More Functions

PASTING DEFINED NAMES INTO FORMULAS


Range names are the perfect way of making unsure of the defined name or its spelling?
more complex formulas easier to comprehend. Fortunately, Excel provides you with a facility
You can type defined names into formulas as the where defined names can be pasted into formulas
formula is created. But what happens if you are directly from a list of valid names.

1
Try This Yourself:
Continue using the
Same

previous file with this


File

exercise, or open the file


Defined Names_6.xlsx...

 Click on the Past 5


years worksheet tab,
then click in cell B10
This is the last year of
total sales for Australia
and should be based on
the total sales in the
Australia worksheet… 2

 Click on the Formulas


tab, click on Use in
Formula in the Defined
Names group, then click
on Paste Names to
display the Paste Name
dialog box

 Click on AUS_Sales,
then click on [OK]
automatically build a
5

formula

 Press
formula
to accept the

 Repeat the above steps


to create the formulas
as follows:
Cell Formula
C10 =UK_Sales
D10 =NZ_Sales

For Your Reference… Handy to Know…


To paste defined names into a formula:  You can press to display the Paste Name
1. Click in the cell where you want the formula dialog box.
2. Click on the Formulas tab, then click on Use
in Formula in the Defined Names group
3. Click on Paste Names, then click on the
desired name

© 2017 The University of Nottingham Page 30 Chapter 3 - Defined Names


Microsoft Excel 2016 - More Functions

DEFINING NAMES FOR CONSTANT VALUES


If you have key values in your formulas that are because it doesn’t need to be changed. Constants
unlikely to change, you can create a name to are defined in the same way as normal range
represent a value rather than a cell reference. names, except that they are not directly entered
This type of value is known as a constant into a cell in the workbook.

1
Try This Yourself:
Continue using the
Same

previous file with this


File

exercise, or open the file


Defined Names_7.xlsx...

 On the Past 5 years


worksheet, click in cell
F5, type Tax, then press

 Click on the Formulas


tab, then click on Define
Name in the Defined
Names group to see the 3
New Name dialog box

 Type TaxRate in Name,


then press until
Refers to is selected

 Type 10%, then click on


[OK]

 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

 Click in cell F6 again,


then click and drag the fill
handle down to cell F10
Each formula in the filled
cells will use the constant

For Your Reference… Handy to Know…


To create a defined name for a constant value:  One advantage of creating a name for a
1. Click on the Formulas tab, then click on value is that the value is not easily
Define Name in the Defined Names group accessible, and therefore has some
protection. To display the value in a
2. Type the name for the constant
worksheet, use the name of the constant in a
3. Replace the address in Refers to with a formula, and format it to your requirements.
value For example, =TaxRate.

© 2017 The University of Nottingham Page 31 Chapter 3 - Defined Names


Microsoft Excel 2016 - More Functions

CREATING NAMES FROM A SELECTION


There will be times in a workbook when you have the labels and assign them as defined names to
a whole lot of labels that are used to describe the the cells to the right (the most common), the left, to
contents of the adjacent cells. When this occurs the top, or to the bottom of the labels.
you can select the cells and get Excel to pick up

1
Try This Yourself:
Continue using the
Same

previous file with this


File

exercise, or open the file


Defined Names_8.xlsx...

 Click on the Australia


worksheet tab, then select
the range A7:B11
The range must include a
series of labels and this
one does, in column A…

 Click on the Formulas tab,


then click on Create from
Selection in the Defined
2

Names group to display


the Create Names from
Selection dialog box

 Ensure that Left column


is ticked (because that is
where the labels are), then
click on [OK] 4

 Click on the Name box


drop arrow to see the new
names

 Repeat the above steps


for the following ranges:
Worksheet Range
United Kingdom A7:B11
New Zealand A7:B11

 Click on the Name box


drop arrow, then click on
Edgecliff_Cellars to
navigate to that range

For Your Reference… Handy to Know…


To define names from a selection:  The Create from Selection command is
1. Select the range (including the labels) typically used where the labels are in the first
column and values are in the second. You
2. Click on the Formulas tab, then click on
must ensure that the labels are somewhere
Create from Selection in the Defined
in the selected range.
Names group
3. Specify the label location and click [OK]

© 2017 The University of Nottingham Page 32 Chapter 3 - Defined Names


Microsoft Excel 2016 - More Functions

SCOPING NAMES TO A WORKSHEET


Unless otherwise specified, defined names are range names to the worksheet. This means that a
scoped to the entire workbook. This means that range name will only be available to the worksheet
range names can be accessed from any in which it was created.
worksheet in the workbook. You can also scope

Try This Yourself:


Continue using the
Same

previous file with this


File

exercise, or open the file


Defined Names_9.xlsx...

 Click on the Australia


worksheet tab

 Click in cell B7, hold


down , then click in
3 5

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

 Click on the drop arrow


for Scope to see the
current worksheet names

 Select Australia, then


click on [OK]
The name Account_Value
should appear in the
Name box…

 Click on the United


Kingdom worksheet tab,
then click on the Name
box drop arrow
Account_Value will not
appear because it has
been scoped to the
Australia worksheet

For Your Reference… Handy to Know…


To scope a defined name to a worksheet:  Normally you can’t have duplicate range
1. Select the range in the worksheet names in a workbook. Since worksheet
range names are scoped only to a worksheet
2. Click on the Formulas tab, then click on
it is possible to have the same range name
Define Name in the Defined Names group
duplicated across several of the worksheets.
3. Click on the drop arrow for Scope, then click
on the worksheet name

© 2017 The University of Nottingham Page 33 Chapter 3 - Defined Names


Microsoft Excel 2016 - More Functions

USING THE NAME MANAGER


Once you have several defined names in a names, or just see what is available. Fortunately,
workbook, management of those names Excel’s Name Manager allows you to do all of
becomes crucial. There will be times when you these things plus more.
want to redefine a name, delete redundant

1
Try This Yourself:
Continue using the previous
Same

file with this exercise, or


File

open the file Defined


Names_10.xlsx...

 Click on the Formulas tab,


then click on Name
Manager in the Defined
Names group to see the
Name Manager dialog box

 Spend a few moments


scrolling through the list to
see what is there

 Click on Dodgy_Bros in
Name, then click on
[Delete]

 Click on [OK] to confirm the


deletion
5

 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 [Filter], then click


on Names Scoped to
Worksheet to see only the
names scoped to
worksheets

 Click on [Close]

For Your Reference… Handy to Know…


To using the Name Manager for defined names:  Be careful of the filter because it is a
1. Click on the Formulas tab, then click on compound filter. Each time you choose a
Name Manager in the Defined Names filter option it builds from the previous filter to
group further refine your search. If you no longer
want to work with a filtered names list, use
2. Use the Name Manager to delete, edit and
the Clear Filter option to clear the filter out.
filter the range names as appropriate

© 2017 The University of Nottingham Page 34 Chapter 3 - Defined Names


Microsoft Excel 2016 - More Functions

DOCUMENTING DEFINED NAMES


The job’s not done till the paperwork’s finished – documentation tool so that you, and other users,
or so the saying goes. Excel allows you to paste can see what defined names are in the workbook
a list of all defined names and their locations into and what ranges they refer to.
the workbook. This provides an invaluable

2
Try This Yourself:
Continue using the
Same

previous file with this


File

exercise, or open the file


Defined Names_11.xlsx...

 Click on the New sheet


icon at the bottom of the
workbook to create a new 3
worksheet
It is best if documenting is
done in a new
worksheet…

 Click on the Formulas


tab, click on Use in
Formula in the Defined
Names group, then click
on Paste Names to see
the Paste Name dialog
box

 Click on [Paste List] to


paste a list of range
names into the worksheet
5

 Double click on the border


between the headings for
columns A and B to best
fit column A

 Click elsewhere in the


worksheet to deselect the
cells and see the changes
more clearly

For Your Reference… Handy to Know…


To paste a list of defined names into a  Be careful when creating a defined name list
worksheet: as only those defined names scoped to the
1. Click on the Formulas tab, then click on Use workbook will be listed. Defined names
in Formula in the Defined Names group scoped to worksheets do not appear in the
2. Click on Paste Names list.
3. Click on [Paste List]

© 2017 The University of Nottingham Page 35 Chapter 3 - Defined Names


Microsoft Excel 2016 - More Functions

NOTES:

© 2017 The University of Nottingham Page 36 Chapter 3 - Defined Names


Microsoft Excel 2016 - More Functions

CHAPTER 4 LOOKUP FUNCTIONS


INFOCUS

Excel provides a number of functions that allow you to look up and


extract data from a list or table. These are known as Lookup
functions and they can be used for a variety of purposes, such as:
 returning the appropriate tax rate based on salary
 returning the data that is at, say, the second column, third
row of a table
 returning the description, price and discount rate of an item,
based on its code in the data inventory.

In this session you will:

 gain an understanding of data lookup functions


 learn how to use the CHOOSE function
 learn how to use VLOOKUP
 learn how to use VLOOKUP for exact matches
 learn how to use HLOOKUP
 learn how to use INDEX
 learn how to use the MATCH function
 gain an understanding of reference functions
 learn how to use ROW and ROWS
 learn how to use COLUMN and COLUMNS
 learn how to use ADDRESS
 learn how to use INDIRECT
 learn how to use OFFSET.

© 2017 The University of Nottingham Page 37 Chapter 4 - Lookup Functions


Microsoft Excel 2016 - More Functions

UNDERSTANDING DATA LOOKUP FUNCTIONS


Data lookup functions are used to retrieve data part of a table of information which can be referred
from a table. They generally require at least two to as a calculation area. The where to look for it is
pieces of information; what to look for and where known as a data table – a table in which a list of
to look for it. The what to look for part is often rates, figures, text or other items are held.

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.

© 2017 The University of Nottingham Page 38 Chapter 4 - Lookup Functions


Microsoft Excel 2016 - More Functions

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.

Try This Yourself:


Before starting this
Open

exercise you MUST open


File

the file Lookup


Functions_1.xlsx...

 On the Payroll Tables


worksheet tab, click on the
drop-arrow of the Name
Box, then select Rate_1
The hourly payroll rates
have been placed on the
Payroll Tables worksheet
and each rate has been 1
given a separate name…

 Click on cell C4 to see that


the second rate has been
named Rate_2

 Click on the Payroll


worksheet tab, then click in
cell D5
We’ll use CHOOSE to look
up the pay rate…

 Type
=CHOOSE(C5,Rate_1,
Rate_2,Rate_3,Rate_4,Ra
te_5)

 Press
4

 Click in cell D5, then click


and drag the fill handle
down to cell D13
The hourly rates and the
resulting calculated gross
pay are now complete
6

For Your Reference… Handy to Know…


CHOOSE(index_num,value1,value2,...)  When you set up a data area for the
CHOOSE function, the labels or values to the
This function selects a number, cell reference,
left of the data play no particular role other
defined name, formula, function, or text from a
than to describe the values listed. This is in
list of up to 254 different options. The
contrast to other lookup functions which
index_num indicates which of the values to
search the first column of a data table for a
select, based on their position in the list.
match.

© 2017 The University of Nottingham Page 39 Chapter 4 - Lookup Functions


Microsoft Excel 2016 - More Functions

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

with this exercise, or open the


file Lookup Functions_2.xlsx...

 Click on the drop arrow for the


Name Box, then select
Tax_Table
This is the data table for our
VLOOKUP function…

 Click on the Payroll worksheet


tab, then click in cell G5
6
 Type
=VLOOKUP(F5,Tax_Table,2)

 Press
0% appears because the
Gross Pay is less than $500…

 Double-click on the fill handle


in cell G5 to copy the formula
down

 In cell H5 enter the formula


=F5*G5, then double-click on
the fill handle to copy the
formula down

 In cell I5 enter the formula =F5-


H5, then double-click on the fill
handle to copy the formula
8

down

 Click in cell C10, then type 2


and press
Notice the change in the Pay
Scale for Alana Keane results
in changes to the Hourly Rate,
Gross Pay, Tax Rate, Tax and
Net Pay

For Your Reference… Handy to Know…


VLOOKUP(lookup_value,table,col_index_num)  An alternative to the VLOOKUP function is
the horizontal or HLOOKUP function. This
This function searches down the left-most
looks for a value in the top row of a table or
column of the table until it finds the lookup-
array of values, and returns the value from
value or the row with the next lowest value. It
the same column in the row you specify.
then refers to the column index number
nominated in the function, and returns the value
found in the corresponding row and column.

© 2017 The University of Nottingham Page 40 Chapter 4 - Lookup Functions


Microsoft Excel 2016 - More Functions

USING VLOOKUP FOR EXACT MATCHES


Generally, the VLOOKUP function uses three may only want to return a value if you get an exact
arguments: the lookup-value, the table location match, and the optional fourth argument, match-
and the column number. This lookup will find a type, makes this possible. By adding FALSE to the
row based on a numeric range. However, you function, #NA is returned if a match isn’t found.

3
Try This Yourself:
Continue using the previous
Same

file with this exercise, or


File

open the file Lookup


Functions_3.xlsx...

 Click on the drop arrow for


Name Box, then select
Items_List
This lookup table includes
specific product codes that
require an exact match…

 Click on the Invoice


worksheet tab, then click in
cell C7
7

We’ll use the exact lookup


to find the description…

 Type =VLOOKUP
(B7,Items_List,2,FALSE)

 Click in cell E7, type


=VLOOKUP(B7,Items_List
,3,FALSE), then press

 Click in cell F7, type


=IF(ISBLANK($B$3),0,
VLOOKUP(B7,Items_List,
4, FALSE)), then press

 Click in cell G7, type


=(D7*E7)*(1-F7), then
press

 Copy the formulas in


columns C, E, F and G
down to Row 10 to
complete the invoice, as
shown

For Your Reference… Handy to Know…


To use VLOOKUP for exact matching:  You can use the ISNA(value) function to trap
VLOOKUP(lookup_value,table,col,range_lkup) #NA results. For example, the structure
=IF(ISNA(lookup),“Code not found”,lookup)
Use the value of FALSE for range_lkup when
will display a useful message when an exact
you want to ensure exact matches only. #NA
match is not possible, rather than #NA which
will be returned if an exact match isn’t found.
does not explain the problem clearly.

© 2017 The University of Nottingham Page 41 Chapter 4 - Lookup Functions


Microsoft Excel 2016 - More Functions

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

file with this exercise, or


File

open the file Lookup


Functions_4.xlsx...

 Click on the Index


worksheet tab, then click in
cell D14 and examine the
formula
This is an example of the
VLOOKUP function. This
scans down the list of
options looking for the
corresponding Equipment
number. When it finds a
match, it returns the 3
description.
You can use HLOOKUP in
a similar way…

 Click in cell D15, then type


=HLOOKUP(C15,Rate_Typ
e,2,TRUE)

 Press
The name of the Rate Type
will be returned and
displayed…

 Experiment with different


values in cells C14 and C15
You’ll find that the formulas
return the corresponding
descriptions

For Your Reference… Handy to Know…


HLOOKUP(lookup_value,table,row_index_num)  If the lookup_value is smaller than the
This function searches across the top-most smallest value in the first row of table,
column of the table until it finds the HLOOKUP will return the #N/A error value.
lookup_value or row with the next lowest value.  Range_lookup is an optional argument. If
It refers to the row index number nominated in TRUE or omitted, it will find the closest
the function, and returns the value found in the match in the top row. FALSE forces an exact
same column and corresponding row. match.

© 2017 The University of Nottingham Page 42 Chapter 4 - Lookup Functions
Microsoft Excel 2016 - More Functions

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

previous file with this


File

exercise, or open the file


Lookup Functions_5.xlsx...

 Click on the drop arrow for


the Name Box, then select
Rate_List 3
This will take you to the
lookup table which shows
the various hire rates for
communications
equipment…

 Click in cell C18 and type


=INDEX(Rate_List,C14,C1
5)
4
 Press
This will vary depending
upon which figures appear
in cell C14 and cell C15...

 In cell C19, type =C16*C18,


then press
The function has looked up
the figure for the equipment
type for the rate, and has 5
returned the value. The
total multiplies the number
of days hire by the hire rate
to give the Total Hire cost…

 Click in cell C14, type 1,


then press
The value returned is that
for equipment type 1 with
the given rate type

For Your Reference… Handy to Know…


INDEX(array,row,column)  The INDEX function can also be used for
multiple tables, where it takes the form:
This function goes to the table at the array or
range specified and returns the value found in INDEX(reference,row,column,area).
the specific row and column of the table.  Here reference refers to one or more
ranges, and area refers to which of these
ranges to look in for the value.

© 2017 The University of Nottingham Page 43 Chapter 4 - Lookup Functions


Microsoft Excel 2016 - More Functions

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

file with this exercise, or open


File

the file Lookup


Functions_6.xlsx...

 On the Index worksheet, click


in cell C18 and examine the
formula
At the moment, the formula 3
uses the Rate Type in cell
C15 to determine which
column to look in. Using
MATCH you can allow the
user to type the rate name
rather than a number...

 Click in cell C15 and type


Staff, then press and
delete the contents of cell D15
which will display an error
4

 Click in cell C18 to display the


formula in the Formula Bar,
then double-click in cell C15 in
the formula to select it
We’ll replace it with the
MATCH function…

 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

For Your Reference… Handy to Know…


MATCH(lookup_value,table,match_type)  When MATCH searches for a text value, it
This function searches through the table until it expects to find the list in alphabetical order. If
finds the lookup_value or the row with the next it doesn’t find an exact match in the
lowest value. It returns the position of the value alphabetical search, it will return the position
in the array. Match_type can be 1 (find value of the word that would have appeared
less than or equal to lookup_value), 0 (exact alphabetically before it in the list. This can be
match) or -1 (value greater than or equal to). varied by changing match-type.

© 2017 The University of Nottingham Page 44 Chapter 4 - Lookup Functions


Microsoft Excel 2016 - More Functions

UNDERSTANDING REFERENCE FUNCTIONS


Reference functions are functions that work column of a cell. Mostly, they are used for quite
with cell, row, column and range references. advanced formulas and so it is important that you
They are used to locate cells or ranges, or to have an understanding of how they work and what
identify independently the row of a cell or the the term cell reference really means.

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.
.

© 2017 The University of Nottingham Page 45 Chapter 4 - Lookup Functions


Microsoft Excel 2016 - More Functions

USING ROW AND ROWS


The ROW function returns the row number of a conjunction with other functions, such as
reference. The ROWS function, on the other ADDRESS, to construct cell addresses from
hand, returns the number of rows in a reference. information located in other parts of a spreadsheet.
You can use ROW to create row numbering, or in

1
Try This Yourself:
Before starting this exercise
Open
File

you MUST open the file


Lookup Functions_7.xlsx...

 On the ADDRESSES
worksheet, click in cell A1,
type =ROW() and press

 Click in cell A1, then drag the


fill handle down to cell A9
3
This copies the formula down
and gives you row numbering.
What if you insert a row?

 Click on the row header for


row 5, click on the Home tab,
then click on Insert in the
Cells group
The numbers automatically
adjust...

 Copy the formula in cell A4


down to cell A5 to complete
the numbering
5

 Click in cell A12, type


=ROWS(A1:A10), then press

This counts the number of


rows in the range that you’ve
specified, whether or not they
have any contents

For Your Reference… Handy to Know…


ROW(reference)  The ROW and COLUMN functions are often
This function returns the row number of the used together to create a complete cell
reference. The reference is optional. reference.

ROWS(reference)
This function returns the number of rows in the
reference.

© 2017 The University of Nottingham Page 46 Chapter 4 - Lookup Functions


Microsoft Excel 2016 - More Functions

USING COLUMN AND COLUMNS


The COLUMN function returns the column column numbering or used in conjunction with other
number of a reference. The COLUMNS function, functions, such as ADDRESS and INDIRECT, to
on the other hand, returns the number of columns enable access to specific cells in a worksheet.
in a reference. COLUMN can be used to create

2
Try This Yourself:
Continue using the
Same

previous file with this


File

exercise, or open the file


Lookup Functions_8.xlsx...

 Ensure the ADDRESSES


worksheet tab is selected

 Click in cell B1 and type


=COLUMN(), then press

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...

 Click in cell B12 and type


=COLUMNS(A1:F1), then
press
Excel counts 6 columns in
this range
4

For Your Reference… Handy to Know…


COLUMN(reference)  COLUMN() returns the column number
rather than the letter that we would usually
This function returns the column number of the
use to refer to a column. Excel is able to
reference. The reference is optional.
interpret this number via other formulas to
COLUMNS(reference) work out which column to look in.
This function returns the number of columns in
the reference.

© 2017 The University of Nottingham Page 47 Chapter 4 - Lookup Functions


Microsoft Excel 2016 - More Functions

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

file with this exercise, or


File

open the file Lookup


Functions_9.xlsx...

 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 the fill handle, drag the


formula down to row 10, then
across to column F
This calculates the cell 3
address of each cell from the
row and column addresses in
column A and row 1...

 Click elsewhere in the


spreadsheet to see the result

For Your Reference… Handy to Know…


ADDRESS(row_num, col_num)  ADDRESS has three optional parameters
which are abs_num, r1 and sheet_text
This function creates a text version of a cell
respectively. If r1 is FALSE, it gives a R1C1
reference from the row_num and col_num. By
style reference. Otherwise, it is A1.
default it creates an absolute cell reference, but
Sheet_text is the text to be used as the
this can be altered by using the optional
worksheet name. It appears before the cell
parameter abs_num where 1=absolute,
reference in the cell.
2=absolute row, 3=absolute column, 4=relative.

© 2017 The University of Nottingham Page 48 Chapter 4 - Lookup Functions


Microsoft Excel 2016 - More Functions

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.

Try This Yourself:


Continue using the previous file
Same
File

with this exercise, or open the


file Lookup Functions_10.xlsx...

 Click on the INDIRECT


worksheet tab, then click in cell
E3
3
This includes property prices as
well as the maximum, minimum
and median house prices. The
list of sales prices is named
Sales_Figures...

 Click in cell F3, type


=ADDRESS(MATCH(Top_Pric
e,Sales_Figures,0) +
ROW(B2),COLUMN(B2)) then
press and click in cell F3
This tells you that the top price
is in $B$11. We need the 4
property’s address which is in
the cell one to the left...

 Click in front of ADDRESS in


the Formula Bar and type
INDIRECT(

 Press to move to the end of


the formula, then edit as shown

 Press , then in F4 type


=INDIRECT(ADDRESS(MATC
H(Min_Price,Sales_Figures,0)
+ ROW(B2),COLUMN(B2)-1)) 5
and press
Now the address of the
minimum price house is also
visible

For Your Reference… Handy to Know…


INDIRECT(ref_text)  By default, INDIRECT expects an A1 format
cell reference. To use a R1C1 style
Retrieves the contents of the cell with the
reference, use the optional parameter a1.
address ref_text.
For example, INDIRECT(“B3”,TRUE) and
INDIRECT(“R3C2”, FALSE) will both return
the contents of B3.

© 2017 The University of Nottingham Page 49 Chapter 4 - Lookup Functions


Microsoft Excel 2016 - More Functions

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

previous file with this


exercise, or open the file
Lookup
Functions_11.xlsx...

 Click on the OFFSET


worksheet tab, then click
in cell F3 2

 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

For Your Reference… Handy to Know…


OFFSET(reference, rows, cols)  The additional optional parameters height
and width determine how many cells are
This function goes to the cell reference, then
returned by the OFFSET function. For
moves down the number of rows and across
example, OFFSET(B3,2,1,2,2) will retrieve
the number of columns specified, then retrieves
the range C5:D6. In this case, it is often used
the data in the cell or range it locates.
with SUM to calculate the total of these cells.

© 2017 The University of Nottingham Page 50 Chapter 4 - Lookup Functions


Microsoft Excel 2016 - More Functions

CHAPTER 5 INFORMATION FUNCTIONS


INFOCUS

The Information functions provided with Excel enable you to retrieve


information related to specified cells. They are useful for testing
data prior to using it further in a worksheet.

In this session you will:

 gain an understanding of Information functions


 learn how to use the CELL function
 learn how to use the ISBLANK function
 learn how to use the ISERR function
 learn how to use the ISODD and ISEVEN functions
 learn how to use the ISNUMBER and ISTEXT functions
 learn how to use the TYPE function.

© 2017 The University of Nottingham Page 51 Chapter 5 - Information Functions


Microsoft Excel 2016 - More Functions

UNDERSTANDING INFORMATION FUNCTIONS


There are seventeen information functions specific conditions exist in a cell. The information
provided in Excel that can be used to return functions are of importance for users who share
information about any specified cell. Most of their spreadsheets with colleagues using earlier
these functions are IS functions which test if versions of Excel. They are listed below.

Information Functions List


The Information functions, although seemingly basic, are best used in conjunction with other functions
such as IF. As a part of an IF function, the Information functions can test the value of a cell when that
value determines the action of the function. For instance, depending on the value of a cell (text, numeric,
date etc.), you might want Excel to apply different formatting.
For more information on each of the Information functions, refer to the Home page of Excel Help and
click on Function reference. Click on the link for Information functions to see the functions list. As
some of the functions can return a variety of numeric or text codes, a listing of these codes is also
available here, by clicking on the function name
CELL ISEVEN ISREF
ERROR.TYPE ISLOGICAL ISTEXT
INFO ISNA N
ISBLANK ISNONTEXT NA
ISERROR ISNUMBER TYPE
ISERR ISODD

Note: If you prefer to write functions using the Function Library on the Formulas tab, the Information
Functions are located in More Functions.

© 2017 The University of Nottingham Page 52 Chapter 5 - Information Functions


Microsoft Excel 2016 - More Functions

USING THE CELL FUNCTION


The CELL function is designed to return indicate a specific cell, Excel will provide
information relating to a specified cell. This can information relating to that cell. If you do not
include information relating to the cell location, indicate a specific cell or range, Excel will refer to
formatting, content or even the filename. If you the cell that was last changed.

2
Try This Yourself:
Before starting this exercise
Open
File

you MUST open the file


Information Functions_1.xlsx...

 Click on the CELL worksheet


tab, then click in cell B5
The CELL function can return a
3
variety of information about a
cell. In this example, we will
use the list of information types
to return different facts about a
cell...

 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

The cell address is returned as


$B$2...

 Click in cell B5, then double-


click on the fill handle to copy
the formula down the table

 Click on a blank area of the


worksheet to see the results
more clearly

For Your Reference… Handy to Know…


CELL(info_type, reference)  When using the CELL function, info_type
This function returns information relating to can produce a number of different results.
a specified cell. This can include information For instance, type might return b (blank), v
on cell formatting, location or contents. (value) or l (label). For more information on
info_type options, click on Function
reference on the Home page of Excel Help
and navigate to Information function topics.

© 2017 The University of Nottingham Page 53 Chapter 5 - Information Functions


Microsoft Excel 2016 - More Functions

USING THE ISBLANK FUNCTION


There are a number of IS functions within the the findings. The ISBLANK function tests whether
Information functions category in Excel. the contents of a cell are completely blank – that is,
Generally, the IS functions test the condition of is the cell completely empty. If the cell is empty,
the contents of a cell and return a value based on this function will return the value TRUE.

2
Try This Yourself:
Continue using the
Same File

previous file with this


exercise, or open the file
Information
Functions_2.xlsx...

 Click on the IS worksheet


tab, then click in cell B2
3

 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...

 Click in cell B2, then drag


the fill handle down to cell
B12 to copy the formula
down the table

For Your Reference… Handy to Know…


ISBLANK(value)  When using the ISBLANK function, a
Checks the value of the specified cell and FALSE result will occur even if the cell
returns TRUE if empty. The function returns contains a single space character or an
FALSE if the cell contains any content. apostrophe.

© 2017 The University of Nottingham Page 54 Chapter 5 - Information Functions


Microsoft Excel 2016 - More Functions

USING THE ISERR FUNCTION


The ISERR function enables you to determine like. Whereas the ISERROR function reports on all
whether a calculation or a cell’s content will errors, ISERR reports on all errors except #N/A.
return one of Excel’s built-in errors. These errors Both functions are handy when used with an IF
include #NULL!, #VALUE!, #NAME? and the function to detect errors in formulas.

2
Try This Yourself:
Continue using the
Same File

previous file with this


exercise, or open the file
Information
Functions_3.xlsx...

 Ensure that the IS


worksheet is currently
active, then click in cell
3

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

For Your Reference… Handy to Know…


ISERR(value)  The ISERR and ISERROR functions are left
Checks for any errors, except #N/A and over from earlier versions. The IFERROR
returns the logical value TRUE. FALSE is function should be used in Excel 2007 or
returned for the error #N/A and any other newer. However, if you need to share
value. information with users of earlier versions, you
should continue to use the ISERR and
ISERROR functions, combined with IF.

© 2017 The University of Nottingham Page 55 Chapter 5 - Information Functions


Microsoft Excel 2016 - More Functions

USING THE ISODD AND ISEVEN FUNCTIONS


The ISEVEN and ISODD functions enable you to considered to be zero and will be reported as even.
determine whether a value contained in a cell is If a cell contains a date, text or a logical value, then
even or odd – that is, whether it is evenly divisible an error or a value that does not make sense will
by 2 or not. If the cell is empty, the content is be returned.

2
Try This Yourself:
Continue using the previous
Same

file with this exercise, or


File

open the file Information


Functions_4.xlsx...

 Ensure that the IS worksheet


is currently active, then click
in cell D2
4

 Type =ISODD(A2)

 Press
formula
to complete the

A TRUE value is returned as


cell A2 contains the value 1,
which we know to be an odd
number...

 Click in cell D2, then double-


click on the fill handle to copy
the formula down the table
5

 Click in cell E2 and type


=ISEVEN(A2)

 Press
formula
to complete the

 Click in cell E2, then double-


click on the fill handle to copy
the formula down the table
7

For Your Reference… Handy to Know…


ISODD(number)  Values containing decimal places are
Checks the value of a cell and returns TRUE ignored by both the ISODD and ISEVEN
if the value is an odd number. functions. For instance, 1.2 and 1.3 would
both return TRUE for the ISODD function,
ISEVEN(number)
and 2.33 and 2.44 would both return TRUE
Checks the value of a cell and returns TRUE for the ISEVEN function.
if the value is an even number.

© 2017 The University of Nottingham Page 56 Chapter 5 - Information Functions


Microsoft Excel 2016 - More Functions

USING THE ISNUMBER AND ISTEXT FUNCTIONS


The ISNUMBER function tests the contents of a text. As well as being useful in conjunction with the
cell and returns TRUE if the contents are numeric IF function, the ISNUMBER and ISTEXT functions
or a date. The ISTEXT function tests the contents are useful when applying conditional formatting to
of a cell and returns TRUE if the contents are cells, to discriminate text and numeric content.

2
Try This Yourself:
Continue using the
Same File

previous file with this


exercise, or open the file
Information
Functions_5.xlsx...

 Ensure that the IS


worksheet is currently
active, then click in cell
5

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

 Click in G2 and type


=ISTEXT(A2)

 Press
the formula
to complete

 Click in cell G2, then


double-click on the fill
handle to copy the
formula down the table

For Your Reference… Handy to Know…


ISNUMBER(value)  When used in conditional formatting, the
Returns TRUE if the value is a number or a ISTEXT function can assist in checking
date. where numbers may have been entered
inadvertently as text.
ISTEXT(value)
Returns TRUE if the value is text.

© 2017 The University of Nottingham Page 57 Chapter 5 - Information Functions


Microsoft Excel 2016 - More Functions

USING THE TYPE FUNCTION


The TYPE function enables you to test the value contains an error will return 16. The other numeric
of a cell and returns a code number to indicate codes that are returned are: 1 for a numeric or date
the content type. For instance, a cell that type, 4 for a logical type and 64 for an array type.
contains text will return 2, whereas a cell that

2
Try This Yourself:
Continue using the
Same File

previous file with this


exercise, or open the file
Information
Functions_6.xlsx...

 Click on the TYPE


worksheet tab, then click in
cell B2

 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...

 Click in cell B2, then


double-click on the fill
handle to copy the formula
down the table
4
Notice that both numbers
and dates are considered
Type 1

For Your Reference… Handy to Know…


TYPE(value)  The TYPE function is useful for testing the
Returns a type code, indicating the data type value type of cell when this will impact on the
for a specified value. behaviour of another function.

© 2017 The University of Nottingham Page 58 Chapter 5 - Information Functions


Microsoft Excel 2016 - More Functions

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.

Where To From Here?


The following is a little advice about what to do next:
 Spend some time playing with what you have learnt. You should reinforce the skills that you
have acquired and use some of the application's commands. This will test just how much of
the concepts and features have stuck! Don't try a big task just yet if you can avoid it - small
is a good way to start.
 Some aspects of the course may now be a little vague. Go over some of the points that you
may be unclear about. Use the examples and exercises in these notes and have another go
- these step-by-step notes were designed to help you in the classroom and in the work
place!
Here are a few techniques and strategies that we've found handy for learning more about
technology:
 read computer magazines - there are often useful articles about specific techniques
 if you have the skills and facilities browse the Internet, specifically the technical pages of
the application that you have just learnt
 take an interest in what your work colleagues have done and how they did it - we don't
suggest that you plagiarise but you can certainly learn from the techniques of others
 if your software came with a manual (which is rare nowadays) spend a bit of time each day
reading a few pages. Then try the techniques out straight away - over a period of time
you'll learn a lot this way
 and of course, there are also more courses and books for you to work through.

Hungry for More?


We live in an ever-changing world where we all need to review and upgrade our
skills.
If you have received this course book on a training course why not ask the tutor or
trainer for other courses that may be of benefit to you. If you are attending a
college ask for one of their brochures.
Alternatively, if you’ve enjoyed using this course book you can find others that
cover a wide range of topics at our web site www.watsoniapublishing.com.

© 2017 The University of Nottingham The University of Nottingham


Concluding Remarks
INDEX
functions .... 4, 5, 6, 7, 8, 9, 10, 11, 53, NOT function ..................................22
54, 55, 56, 57, 58
A
O
ADDRESS function.......................... 48 G
AND function ................................. 20 OFFSET function .............................50
average ............................................ 8 Go To dialog box ............................ 29 OR function ....................................21
AVERAGE ......................................... 3
AVERAGE function ........................... 7
H P
C HLOOKUP function ......................... 42 paste list .........................................35
Paste Names ..................................30
calculation area ............................. 38
CELL function ................................. 53 I
CHOOSE function ........................... 39 R
COLUMN function.......................... 47
IF function ................................ 15, 16
COLUMNS function ........................ 47
IF functions .................................... 55 range names.... 24, 25, 26, 27, 28, 29,
conditional counting ........................ 6
IFERROR function ..................... 18, 55 30, 31, 32, 33, 34, 35
conditional formatting ................... 57
INDEX function ............................... 43 ROW function.................................46
constant names ............................. 31
INDIRECT function.......................... 49 ROWS function ...............................46
constants ....................................... 31
information functions . 54, 55, 56, 57,
COUNT ............................................. 3
58
COUNT function ........................... 4, 5
COUNTA ........................................... 3
Information functions .................... 53 S
ISBLANK function ........................... 54
COUNTA function ........................ 4, 5
ISERR function................................ 55 scoping defined names ..................33
COUNTBLANK function ................ 4, 5
ISERROR function ........................... 55 scoping range names .....................33
COUNTIF function ........................ 5, 6
ISEVEN function ............................. 56 selecting ranges .............................29
counting cells ................................... 4
ISNUMBER function ....................... 57 SMALL function ................................9
ISODD function .............................. 56 standard deviation ................... 10, 11
ISTEXT function .............................. 57
D statistical functions ..........................4
statistical functions list .....................2
statistics ................... 3, 7, 8, 9, 10, 11
data area ....................................... 38 L status bar .........................................3
defined name ................................ 34
STDEV function...............................11
defined names . 24, 26, 27, 30, 31, 33,
labels .............................................. 24 STDEV.P function............................10
35
LARGE function ................................ 9 STDEV.S function ............................10
defining names .............................. 25
logical functions ............................. 14 STDEVA function ............................10
deleting names .............................. 34
logical values .................................. 19 SUM .................................................3
lookup functions ............................ 38 SUMIF function ................................6
E
M T
editing names ................................ 34
empty cells....................................... 5
MAX ................................................. 3 test scores ......................................11
error trapping ................................ 18
MEDIAN function ......................... 7, 8 TRUE ...............................................19
middle number ................................ 8 TYPE function .................................58
MIN .................................................. 3
F MODE function ............................ 7, 8
most frequent number .................... 7 V
FALSE ............................................. 19
function ADDRESS.......................... 48
values using IF function ..................16
function COLUMN.......................... 47 N VAR function ..................................11
function COLUMNS ........................ 47
variance ..........................................11
function HLOOKUP ........................ 42
Name box ................................. 28, 29 VLOOKUP exact match ...................41
function INDIRECT ......................... 49
Name Manager .............................. 34 VLOOKUP function .........................40
function nesting ............................. 17
names from labels ......................... 25
function OFFSET ............................ 50
names from selection .................... 32
function ROW ................................ 46
names in formulas ................... 26, 27
function ROWS .............................. 46
names in lieu of addresses ............. 24
function VLOOKUP................... 40, 41
nest functions ................................ 17
worksheet range names ................ 33
W

You might also like