You are on page 1of 66

Microsoft Excel Fundamentals

Excel

Microsoft Excel
Fundamentals
Excel Fundamentals

Excel Fundamentals

Please check www.bestpracticemodeling.com for any updates to this document. All copyright in this
document and any derivation of this document is owned by bpmToolbox Pty Ltd, bpmModules Pty Ltd,
BPM Analytical Empowerment Pty Ltd and/or its associated entities.

Copyright © bpmToolbox Pty Ltd, bpmModules Pty Ltd, BPM Analytical Empowerment Pty Ltd and
associated entities.

This is a Best Practice Modelling publication. To keep up to date with the ongoing evolution of best
practice modeling practices and technologies, join the Best Practice Modeling Network at
www.bestpracticemodeling.com/network).

Document version: 7.0.0.0

BEST PRACTICE MODELLING (BPM)

Best Practice Modelling (BPM) is a business modeling organization that specialises in the provision of
best practice spreadsheet modeling resources including software, consulting and training services. BPM
is the founding member of the Spreadsheet Standards Review Board (SSRB) and remains committed to
overseeing the ongoing maintenance, development and adoption of the Best Practice Spreadsheet
Modeling Standards. BPM can be contacted as follows:

Website: www.bestpracticemodelling.com
Email: info@bpmglobal.com

www.bestpracticemodelling.com
Excel Fundamentals

Table of Contents
Chapter 1. Basic Excel ......................................................................................... 5

1.1 Introduction to Excel ................................................................... 5

1.1.1 What is Excel? ............................................................... 5

1.1.2 Excel Interface .............................................................. 5

1.1.3 File Formats .................................................................. 6

1.1.4 File Handling Shortcuts ................................................... 6

1.1.5 Navigation Shortcuts ...................................................... 7

1.1.6 Editing Cell Content ........................................................ 8

1.1.7 Cut, Copy & Paste .......................................................... 8

1.2 Formats & Styles ........................................................................ 9

1.2.1 Formats vs. Styles ......................................................... 9

1.2.2 Data Type Consistency – Number Formats in Excel ............ 12

1.2.3 Date Format ................................................................. 12

1.2.4 Custom Number Formatting............................................ 13

1.2.5 Creating & Applying Styles ............................................. 15

1.2.6 Copying Formats & Styles .............................................. 16

1.3 Formula Creation Principles ......................................................... 17

1.3.1 Basic Formula Creation Principles .................................... 17

1.3.2 More Advanced Formula Creation Principles ...................... 20

1.4 Mixing Text & Formula ................................................................ 23

1.4.1 Creating ‘Live Sentences’ ............................................... 23

1.4.2 The TEXT Function ........................................................ 24

1.5 Applying & Using Excel Names ..................................................... 25

1.5.1 Excel Naming Principles ................................................. 25

1.5.2 Assigning Names .......................................................... 26

1.5.3 Potential Issues With Excel Names .................................. 27

www.bestpracticemodelling.com Page 1 of 62
Excel Fundamentals

Chapter 2. Intermediate Excel ........................................................................... 29

2.1 Calculation Modes ...................................................................... 29

2.1.1 Introducing Calculation Modes ........................................ 29

2.1.2 Changing Calculation Modes ........................................... 29

2.2 Conditional Formatting ............................................................... 30

2.2.1 Introducing Conditional Formatting .................................. 30

2.2.2 Applying Conditional Formats.......................................... 31

2.3 Auditing Tools ........................................................................... 36

2.3.1 Introducing Auditing Tools .............................................. 36

2.3.2 Tracing Precedents & Dependents ................................... 36

2.3.3 Error Checking ............................................................. 37

2.4 Inserting & Using Controls........................................................... 38

2.4.1 Introduction to Controls ................................................. 38

2.4.2 Benefits of Controls ....................................................... 39

2.4.3 Using Controls .............................................................. 40

2.5 Grouping & Hiding of Rows & Columns .......................................... 42

2.5.1 Grouping vs. Hiding ....................................................... 42

2.5.2 Hiding Rows or Columns ................................................ 42

2.5.3 Grouping Rows or Columns............................................. 44

2.5.4 Benefits of Grouping over Hiding ..................................... 45

2.6 Hyperlinks ................................................................................ 45

2.6.1 Introduction to Hyperlinks .............................................. 45

2.6.2 Inserting Hyperlinks ...................................................... 46

2.6.3 Hyperlink Properties ...................................................... 46

2.7 Protecting Sheets & Workbooks ................................................... 47

2.7.1 Different Levels of Protection .......................................... 47

2.7.2 Benefits of Security & Protection ..................................... 47

2.7.3 Workbook Protection ..................................................... 48

2.7.4 Sheet Protection ........................................................... 48

www.bestpracticemodelling.com Page 2 of 62
Excel Fundamentals

Chapter 3. Advanced Excel ................................................................................ 49

3.1 Data Validation .......................................................................... 49

3.1.1 Introduction to Data Validation ....................................... 49

3.1.2 Applying Data Validation ................................................ 50

3.2 Data Tables .............................................................................. 53

3.2.1 Introduction to Data Tables ............................................ 53

3.2.2 Creating Data Tables ..................................................... 54

3.3 Data Tools ................................................................................ 56

3.3.1 PivotTables .................................................................. 56

3.3.2 Excel Tables ................................................................. 58

3.3.3 Sorting & Filtering ......................................................... 60

www.bestpracticemodelling.com Page 3 of 62
Basic Excel

Chapter 1
Basic Excel
1.1 Introduction to Excel

1.1.1 What is Excel?

Microsoft Excel is a desktop spreadsheet application, widely used by individuals and


corporations to perform tasks ranging from basic calculations to building large, complex
financial models.

A standard Excel workbook contains one or more sheets. The most common type of sheet is
called a worksheet. Each worksheet contains cells that are arranged in a grid system of rows
and columns. Cells can contain a wide range of information (numbers, text, dates, etc…) that
is either entered directly into the cell or is calculated based on the formulas within them.

It is this infrastructure that has resulted in Excel becoming the world’s most universal
calculation and analysis tool.

1.1.2 Excel Interface

The following image shows the Excel 2007 interface, with an open workbook containing three
empty worksheets:

Excel Interface

www.bestpracticemodelling.com Page 5 of 62
Basic Excel

1.1.3 File Formats

Introducing File Formats

An Excel workbook can be saved in several different formats, each with a unique file
extension, e.g. .xlsx, .xlsm.

To save a new workbook into a particular format, or convert an existing workbook into a
different format, click the Office Button in the top left corner and select the desired format
from the Save As menu. Alternatively, use the keyboard shortcut Alt+F+A to activate the
Save As dialog box, then choose the desired file format from the Save As Type drop down
box.

Comparing File Formats

Each Excel file format has different levels of functionality and compatibility with different
versions of Excel. This should be considered when choosing a file format.

The following table compares the most commonly used Excel file formats:

Name Extension Compatibility Functionality

Excel Workbook .xlsx Excel 2007 + Standard file format with macros
disabled.

Excel Macro- .xlsm Excel 2007 + Standard file format with macros
Enabled workbook enabled.

Excel Binary .xlsb Excel 2007 + Compressed file format with macros
Workbook enabled.

Excel 97-2003 .xls Excel 97 + Standard Excel 97 -2003 file format


Workbook with macros enabled.

CSV (Comma .csv Excel 97 + Stores tabular data in plain-text form,


delimited) separated by a comma.

It is important to note that saving a macro-enabled file (e.g. .xlsm, .xlsb) as a macro-
disabled file (e.g. .xlsx) will result in all macros being removed from the new file.

1.1.4 File Handling Shortcuts

Keyboard shortcuts provide a quick and efficient alternative to using the mouse as a means
of navigating around Excel and activating Excel’s tools. For example, the keyboard shortcut
to create a new workbook is ‘Ctrl+N’. To use this keyboard shortcut, press and hold down
the ‘Ctrl’ key followed by the ‘N’ key.

Below is a list of shortcut keys for performing basic file handling tasks such as opening,
closing and saving workbooks.

Keyboard Shortcut Command

Ctrl+N Creates a new workbook.

Ctrl+O Opens an existing workbook.

Ctrl+W Closes the active workbook.

Ctrl+S Saves the active workbook.

Ctrl+P Prints the active workbook.

www.bestpracticemodelling.com Page 6 of 62
Basic Excel

These keyboard shortcuts can be used consistently in other applications within the Microsoft
Office Suite, such as Microsoft Word or Power Point.

1.1.5 Navigation Shortcuts

Navigating around a workbook or worksheet is much easier and quicker using the keyboard
than the mouse. Below is a list of keyboard shortcuts for workbook and worksheet
navigation:

Keyboard Shortcut Command

PageUp Moves one screen up in the worksheet.

PageDown Moves one screen down in the worksheet.

Alt+PageUp Moves one screen to the left in the worksheet.

Alt+PageDown Moves one screen to the right in the workbook.

Ctrl+Arrow Moves to the edge of the current data region.

Ctrl+Shift+Arrow Extends the selection of cells to the last


nonblank cell in the same column or row as the
active cell.

Ctrl+Home Moves to the beginning of the worksheet.

Ctrl+End Moves to the last cell on the worksheet, in the


lowest used row of the right-most used column.

Ctrl+PageUp Moves to the previous sheet in a workbook.

Ctrl+PageDown Moves to the next sheet in a workbook.

Ctrl+Shift+PageUp Selects the current and previous sheet in a


workbook.

Ctrl+Shift+PageDown Selects the current and next sheet in a


workbook.

Ctrl+Shift++ Insert a new row or column.

Ctrl+Spacebar Selects an entire column in the selected


worksheet.

Shift+Spacebar Selects an entire row in the selected worksheet.

Ctrl+G or Ctrl+F5 Displays the Go To dialog box.

www.bestpracticemodelling.com Page 7 of 62
Basic Excel

1.1.6 Editing Cell Content

Each cell in a worksheet may contain a constant or a formula. Constants are sometimes
referred to as ‘hard-codes’ or ‘inputs’, although the correct and least misleading terminology
is ‘constants’. An example of both constant and formula cell content is provided below, with
the formula bar showing the content of each cell:

Constant Formula

Cell content can always be entered and edited in the formula bar by typing or editing the
content and pressing Enter. This is sometimes referred to as ‘inputting’ data, although the
correct and least misleading terminology is ‘entering’ data.

In the formula example above, the reference to the cell A2 can be created by first typing ‘=’
and then either typing ‘A2’ or by clicking the mouse on that cell.

The right-hand example also shows Edit Mode. Excel enters Edit Mode during the data entry
process, and assists with the entry of formulas by temporarily overlaying precedent ranges
with colored boxes (as shown for cell A2 in this instance). To enter Edit Mode, select the cell
to edit and either start typing or press the F2 key.

1.1.7 Cut, Copy & Paste

Content within ranges can be moved and copied using Excel’s cut, copy and paste
commands.

Copy & Pasting

If a range is copied and pasted to another range, a duplicate of the source range is created
within the destination range. All links to the cells within the source and destination ranges
will be retained.

Cut & Pasting

If a range is cut and pasted to another range, the source range is transferred to the
destination range. All links to the cells within the source range will move to their
corresponding cells within the destination range, but any links to cells within the original
destination range will become redundant. Model users should therefore take great care when
using the cut and paste command.

www.bestpracticemodelling.com Page 8 of 62
Basic Excel

The following table provides a list of commonly-used cut, copy and paste command keyboard
shortcuts:

Keyboard Shortcut Command

Ctrl+C Copies the selected range/object.

Ctrl+X Cuts the selected range/object.

Ctrl+V Pastes any cut or copied content.

Ctrl+Z Uses the Undo command to reverse the last


command.

Ctrl+Y Repeats the last command or action.

Ctrl+R Copies the contents of the left-most cell of the


selected range into the cells to the right.

Ctrl+D Copies the contents of the top-most cell of the


selected range into the cells below.

Cut Copy Mode

When a range is cut or copied the selection will have a flashing border to indicate that the
selected range has been cut or copied. This state is Excel as referred to in ‘Cut Copy Mode’,
and can be cancelled by pressing the Escape key.

1.2 Formats & Styles

1.2.1 Formats vs. Styles

What are Formats and Styles?

For the purposes of this introduction, formats and styles can be defined as follows:

 Format: A format is a single property or attribute of a cell that affects its appearance
or behaviour. This may include; number format, font (name, size, color), alignment
(vertical and horizontal), borders, patterns, and protection.

 Style: A style is a preset combination of formats, used to save time and ensure
consistency in the application of formats.

By way of example, a format might be font color of a cell, while a style might be the preset
combination of font color, font name, font size and horizontal alignment to a cell. Essentially,
using styles is a straight-forward and convenient method of applying multiple formats at
once.

In Excel, the following are examples of formats that may be applied to the font component of
a cell:

a. Name

b. Style (Regular, Bold & Italic)

c. Size
d. Underline

e. Color

f. Strikethrough

www.bestpracticemodelling.com Page 9 of 62
Basic Excel

g.
Superscript

h. Subscript

These formats may be changed by way of the Format Cells dialog box (Ctrl+1) or selecting
the required command under the Home tab.

Below is a list of keyboard shortcuts used to apply font formatting:

Keyboard Shortcut Command

Ctrl+B Applies or removes bold formatting.

Ctrl+I Applies or removes italic formatting.

Ctrl+U Applies or removes underlining.

Ctrl+5 Applies or removes strikethrough.

These keyboard shortcuts are consistent across all applications in the Microsoft Office Suite.

Why use Formats and Styles?

As with the production of Word documents, styles and formats are essential to the creation
of spreadsheet models with a visually consistent and appealing appearance. However, the
value of styles and formats within a spreadsheet model is greatly enhanced when they are
applied in a purpose-based manner. This concept is discussed in detail in the Best Practice
Spreadsheet Modelling Standards.

Additionally, the consistent use of formats and styles within an organization can promote
standardization and a corporate identity akin to that commonly achieved in Microsoft Word
and PowerPoint presentations.

www.bestpracticemodelling.com Page 10 of 62
Basic Excel

Changing Cell Formats

Formats and styles can be applied via the Font, Alignment and Number groups within the
Home tab. Alternatively the formats applied to the selected range can be viewed and edited
using the Format Cells dialog box, which can be loaded using the keyboard shortcut Ctrl+1,
as shown below:

Format Cells Dialog Box

The format cells dialog box groups formats into six format groups; Number, Alignment, Font,
Border, Fill, Protection. These format groups can be included or excluded when creating and
editing styles, which is discussed further in 1.2.5 Creating and Applying Styles.

www.bestpracticemodelling.com Page 11 of 62
Basic Excel

1.2.2 Data Type Consistency – Number Formats in Excel

There are a wide range of data types that can be used in a spreadsheet. The consistent use
of number formats best communicates to other spreadsheet users the type of data within
each cell. The following table lists a range of available number formats and their
corresponding appearance:

Number Format Keyboard Shortcut Appearance

General Ctrl+Shift-` 1000

Number Ctrl+Shift-1 -1,000.10

Currency Ctrl+Shift-4 -$1,000.10

Accounting None $1,000.10

Date Ctrl+Shift-3 01/01/2013

Time Ctrl+Shift-2 1:30:55 PM

Percentage Ctrl+Shift-5 99.00%

Fraction None ¼

Scientific Ctrl+Shift-6 1.00E + 03

Text None 1000

1.2.3 Date Format

Dates in Excel appear in a standard date format, e.g. 01/01/2013, however the actual value
is stored as a number (usually representing the number of days since 1st January, 1900). For
example, the date 01/01/2013 will be the number 41,275, as shown below:

Date Example

www.bestpracticemodelling.com Page 12 of 62
Basic Excel

1.2.4 Custom Number Formatting

Custom number formats can be applied by selecting the Custom category within the Number
tab of the Format Cells dialog box, as shown below:

Format Cells Dialog Box, Number Tab, Custom

The syntax for creating custom number formats is shown below:

[Positive numbers];[negative numbers];[zero values];[text values]

Each of these sections is separated by a semicolon (;). To create a custom number format,
not all sections need to be specified. For example, if only the first two sections were
included, the first section would be used for positive numbers and the second section would
be used for negative numbers. Since there is no third section, zero values will default to the
first section. Text is only affected by the last section, i.e. only when all four sections are
specified.

www.bestpracticemodelling.com Page 13 of 62
Basic Excel

The following table provides a summary of some of the most common codes used when
creating custom number formats:

Example
Number Code Description Format Example Presentation

General General number format. General 1000.5

0 Displays all significant zeroes. 0.00 1000.50

# Does not display extra zeroes. #### 1001

. Decimal Point. ####.# 1000.5

% Percentage. 0.0% 100050%

, Thousands separator. #,##0 1,001

E+ / E- Scientific notation. 0.0E+0 1.0E+3

$-+/() Displays these characters in a $#,###.00 $1,000.50


number.

Example
Date Code Description Format Example Presentation

m Month as a number without leading m/d/yy 1/1/13


zeros (1-12).

mm Month as a number with leading mm/d/yy 01/1/13


zeros (01-12).

mmm Month as a text abbreviation (Jan – mmm/d/yy Jan/1/13


Dec).

mmmm Unabbreviated month as text mmmm/d/yy January/1/13


(January – December).

d Day as a number without leading mm/d/yy 01/1/13


zeros (1-31).

dd Day as a number with leading zeros mm/dd/yy 01/01/13


(01-31).

ddd Week day as abbreviated text (Mon mm/ddd/yy 01/Tue/13


– Sun).

dddd Week day as unabbreviated text mm/dddd/yy 01/Tuesday/13


(Monday – Sunday).

yy Year as two-digit number (13). mm/dd/yy 01/01/13

yyyy Year as four-digit number (2013). mm/dd/yyyy 01/01/2013

Example
Time Code Description Format Example Presentation

h Hours as a number without leading h:mm:ss 6:05:07


zeros (0-23).

hh Hours as a number with leading hh:mm:ss 06:05:07


zeros (00-23).

m Minutes as a number without hh:m:ss 06:5:07


leading zeros (0-59).

mm Minutes as a number with leading hh:mm:ss 06:05:07


zeros (00-59).

s Seconds as a number without hh:mm:s 06:05:7


leading zeros (0-59).

www.bestpracticemodelling.com Page 14 of 62
Basic Excel

Example
Time Code Description Format Example Presentation

ss Seconds as a number with leading hh:mm:ss 06:05:07


zeros (00-59).

AM/PM Time based on the 12-hour clock. hh:mm:ss 06:05:07 AM


AM/PM

Example
Other Code Description Format Example Presentation

[BLACK], Displays characters in the specified [Red]General 100


[BLUE], [RED], colours.
[YELLOW]

1.2.5 Creating & Applying Styles

When creating and editing styles, the formats that comprise each style are grouped into six
format areas, which may each be included or excluded from the style:

a. Number;

b. Alignment;

c. Font;

d. Border;

e. Fill; and

f. Protection.

The process for applying styles is very similar to that used for applying formats. To apply a
style to the selected range, select a style from the available styles (Home tab, Styles group)
or using the keyboard shortcut Alt+H+J as shown below:

Styles Gallery

www.bestpracticemodelling.com Page 15 of 62
Basic Excel

Note that the default style applied to all cells in an Excel worksheet (unless otherwise
specified) is the ‘Normal’ style. Excel provides a range of theme-based styles, which can be
modified. Alternatively, custom styles can be created using the ‘New Cell Style’ command in
the styles gallery. For more information regarding the creation and modification of styles see
the Microsoft Excel help documentation.

1.2.6 Copying Formats & Styles

A powerful tool when consistently applying formats and styles is the Paste Special command.
This tool is accessible (when in Cut Copy Mode) via the Paste Special command (Home tab,
Clipboard group) or using the keyboard shortcut Alt+H+V+S. The Paste Special dialog box
appears with a number of options. The table below explains the most commonly used
options:

Paste Type Description

Formulas Pastes only formulas.

Values Pastes only values.

Formats Pastes only formats.

When a cell or range has been copied (Excel is in Cut Copy Mode) then the user is able to
open the Paste Special dialog box and select the operation they would like to perform when
pasting.

Paste Special Dialog Box

www.bestpracticemodelling.com Page 16 of 62
Basic Excel

1.3 Formula Creation Principles

1.3.1 Basic Formula Creation Principles

This section introduces a number of basic concepts fundamental to creating formulas in


Excel.

Cell and Range Addresses

By default Excel uses the ‘A1’ reference style. In Excel 2007-13, this means that worksheet
columns are lettered A through to XFD (i.e. XXX columns) while rows are numbered 1
through to 1,048,576.

The following table demonstrates the cell addresses for various range types:

Range Examples

‘B2’ – the cell in column B and row 2 ‘B2:B5’ – the range of cells in column B and rows 2 to 5

‘B3:E3’ – the range of cells in row 3 and columns B to E ‘5:5’ – all cells in row 5

‘6:7’ – all cells in rows 6 to 7 ‘C:C’ – all cells in column C

‘D:E’ – all cells in columns D to E ‘B2:E6’ – all cells in rows 2 to 6 and columns B to E

Relative and Absolute References

Relative and absolute references determine how the formula references to other cells change
when the cell containing the formula is copied across rows and/or down columns. Formula
references to other cells can be relative, absolute or a combination of both and are
represented by the insertion of the ‘$’ signs before the row and/or column component of
each referenced cell’s address.

www.bestpracticemodelling.com Page 17 of 62
Basic Excel

The following table summarizes the implications of using relative and/or absolute references
when referring to other cells in formulas:

Movement When Copied


Reference Column Row
Type Reference Reference Example Column Row

Relative Relative Relative =A1  

Combination Relative Absolute =A$1  

Combination Absolute Relative =$A1  

Absolute Absolute Absolute =$A$1  

By default new formulas use relative references. Use the F4 key (in Edit Mode) to apply or
remove absolution when writing formulas instead of manually entering the ‘$’ signs. This will
cycle through the options listed in the above table in the order shown in the table.

External Worksheet Formula References

When formulas are used to reference cells within other worksheets within a workbook, the
name of the worksheet and an exclamation mark must precede the range reference. This
syntax should never be added manually (i.e. by typing in the sheet name and exclamation
mark), because it will be inserted automatically when external worksheets cells are selected
during the formula creation process.

The following are examples of external worksheet formula references:

=Opex!A1

=‘Balance Sheet’!A1

In the second example, single quotation marks are required because the referenced
worksheet name contains spaces - i.e. between the words ‘Balance’ and ‘Sheet’.

External Workbook Formula References

Formula references to cells in other workbooks are called ‘external workbook links’. To create
links to other workbooks, the name of the workbook (within square brackets) must precede
the referenced worksheet name and range address:

=‘[Output Forecasts.xlsx]Balance Sheet’!$A$1

In this example, the external workbook ‘Output Forecasts.xlsx’ is open. If the external
workbook were closed, the link would contain its full file directory (e.g. ‘C:\My
Documents\...’) in addition to its file name.

It is important to note that formulas that reference cells in other workbooks use absolute
references by default. These can be changed by the same F4 keystroke as noted in the
section above.

As with external worksheet formula references, this syntax should never be added manually
because it will be inserted automatically when the external worksheet cells are selected
during the formula creation process.

www.bestpracticemodelling.com Page 18 of 62
Basic Excel

Formula Operators

The simplest formulas to create other than direct cell references involve the use of formula
operators, constructed in a manner almost identical to the writing of arithmetic and algebraic
equations.

The following table contains a list of the key formula operators that can be used in formula
construction:

Operator Description Task

+ Plus sign Addition

- Minus sign Subtraction or Negation

* Asterisk Multiplication

/ Forward slash Division

% Percent sign Percent

^ Caret Raise to a power

= Equal sign Equal to

> Greater than sign Greater than

< Less than sign Less than

>= Greater than or equal to Greater than or equal to

<= Less than or equal to Less than or equal to

<> Not equal to Not equal to

& Ampersand Join text

The construction of formulas using operators is similar to algebraic equations, as the


following example shows, first in normal mode and then in Edit Mode:

Formula Operators Example

www.bestpracticemodelling.com Page 19 of 62
Basic Excel

1.3.2 More Advanced Formula Creation Principles

This section introduces and explains the use of functions within formulas and provides tips
for more efficient formula creation.

Functions within Formulas

Functions are pre-written formulas within Excel that perform specific operations and usually
return either values, a series of values or ranges. To obtain a list of available functions within
Excel select any cell and press Shift+F3.

The syntax below illustrates the general structure of a function:



= Function (Argument_1,Argument_2,…)

 
Generally, functions contain 4 parts:

1. Function name;

2. Opening parenthesis;

3. A series of arguments separated by commas; and

4. Closing parenthesis.

A Simple Function

The IF function represents a simple yet very powerful function within Excel. The IF function
returns one value if a specified condition evaluates to TRUE, and another value if the
condition evaluates to FALSE. The syntax for the IF function, an explanation of its
arguments, and an example is shown below.

=IF(logical_test, value_if_true, value_if_false)

Formula Evaluation Edit Mode

www.bestpracticemodelling.com Page 20 of 62
Basic Excel

Embedded Functions

Excel provides the ability to embed functions within functions – i.e. a function may be
entered into an argument within another function. For example, the following IF function
contains an embedded NPV function and tests the result of this embedded function against a
zero value:

=IF(NPV(0.05, B2:G2)>0, “Accept”, “Reject”)

Embedded Function Example

The ‘Staggered Development’ Principle

To reduce the complexity involved in creating formulas that contain embedded functions, the
‘staggered development’ principle should be applied. This involves entering each embedded
function as a standalone formula in its own cell and then combining them by copying and
pasting embedded functions into the arguments of their parent functions.

For example, the steps required to create the formula in the previous embedded function
example would be:

1. Enter the NPV function into one cell;

2. Enter the IF function (with the logical_test argument left blank) into another cell; then

3. Paste the NPV function from the first cell into the logical_test argument of the IF
function in the second cell.

Formula Presentation & Explanation

To improve the presentation and readability of formulas, multiple lines may be used or
spaces inserted between lines. This may be achieved by the use of the ‘Alt+Enter’ keyboard
shortcut when entering formulas. Multiple line formulas greatly improve readability where
multiple embedded functions are used, as shown in the below example:

Normal Mode Cell Edit Mode

www.bestpracticemodelling.com Page 21 of 62
Basic Excel

The formula bar from Excel 2007 onwards does not automatically re-size to show additional
lines. Therefore, in order to see the second line onwards the user must either click on the
double-down arrow at the far right-hand side of the formula bar, or use the keyboard
shortcut ‘Ctrl+Shift+U’.

To further improve the ease with which a formula can be understood, a formula logic
diagram can be used to diagrammatically represent the logic flows within the formula, as
shown below for a formula containing multiple embedded IF functions:

Formula Schematic Example

www.bestpracticemodelling.com Page 22 of 62
Basic Excel

1.4 Mixing Text & Formula

1.4.1 Creating ‘Live Sentences’

Live sentences are dynamic in that they change based on the result of the evaluation of a
formula. Live sentences are a powerful way of communicating changing information in
reports and presentations in Excel.

Using Text in Formulas

To use text within a formula, the ‘&’ operator is used and the text component is enclosed in
quotation marks. The example below joins a text string with the value in cell A1:

=“Today is ”&A1

Depending on the value in cell A1, the formula result will change accordingly. If cell A1
contains the text string ‘Monday’ then the sentence would read ‘Today is Monday’.

The worksheet shown below contains values and text within a range of cells:

Values and Text

The following table shows how formulas which combine the cell data and text can create
useful output:

Formula Result

=A1&" and "&A3 Richard and Stacey

=A1&" has "&A2&" apples while "&A3&" only has "&A4 Richard has 10 apples while Stacey only has 5

Cell Edit Mode Normal Mode

Use of Quotation Marks

The use of quotation marks in a formula indicates to Excel that the contents within those
quotation marks are text as opposed to values and must be used when combining text and
formulas.

www.bestpracticemodelling.com Page 23 of 62
Basic Excel

1.4.2 The TEXT Function

When creating live sentences, the TEXT function can be used to ensure that the values
referred to in cells are formatted correctly when returned in the live sentence. The TEXT
function converts values to text strings and applies the formatting specified, as shown by the
syntax below:

=TEXT(value, format_text)

Value is a numeric value, a formula that evaluates to a numeric value, or a reference to a


cell containing a numeric value.

Format_text is a number format in text form from in the category box on the Number tab
in the Format Cells dialog box (not General).

The importance of using the TEXT function is illustrated in the example below where the first
sentence refers to cell B2 and does not use the TEXT function, compared with the second
sentence which uses the TEXT Function. The result is that only the second live sentence
communicates the currency type of the sales made by Mike:

Salesperson Example

Formula Result

= A2&“ sold ”&B2&“ worth of widgets.” Mike sold 2800 worth of widgets.

= A2&“ sold ”&TEXT(B2,“$0.00”)&“ worth of widgets.” Mike sold $2800.00 worth of widgets.

www.bestpracticemodelling.com Page 24 of 62
Basic Excel

1.5 Applying & Using Excel Names

1.5.1 Excel Naming Principles

Excel Names vs. Range Addresses

Excel allows the spreadsheet user to assign a descriptive name to, ranges, constants or
formulas. Once named, ranges can be readily identified, located and referenced in formulas
using their name, rather than their address.

After a name is assigned to a cell, it can be referenced using this name in addition to its
address. By default, Excel names each cell on a worksheet with its cell address (e.g. A1, B2,
etc.). Consequently, every time this cell is referenced in a formula, the formula will by
default identify the cell by its defined name rather than its address, as shown below:

Cell Address Defined Name Link to Defined Name

Excel Naming Techniques & Tips

When naming ranges, it is best to ensure that the names used are short, succinct and
correspond to the contents of the cell or ranges. Taking a few seconds to think about a
logical range naming structure before applying range names will aide in consistency going
forward and therefore reduce the complexity of a workbook.

Benefits of Naming Ranges

The principal advantage of names is that if used appropriately, they allow the ready and
descriptive identification of ranges according to their purpose. In turn, this promotes clarity
and encourages understanding of cell content and purpose within the model. The user will
find that formulas become increasingly easy to read and understand as cell references are
replaced with names, thereby reducing the potential for confusion and limiting the likelihood
of errors.

Additionally, there are several technical advantages to naming cells, which are:

 Cells can be moved anywhere in the workbook while still retaining their assigned
names;

 There is less risk of creating errors in formulas if new rows and columns are inserted
after formulas have been entered;

 Conditional formatting formulas can refer to named ranges on worksheets other than
the worksheet containing the conditional formatting (which is otherwise not possible);
and

 Named ranges which are referred to by Visual Basic macros are not corrupted when
the worksheet structure is modified (e.g. the insertion or deletion of rows), or the
name of the parent worksheet is changed (all these things would render a Visual Basic
reference to an unnamed range invalid).

www.bestpracticemodelling.com Page 25 of 62
Basic Excel

1.5.2 Assigning Names

Assigning Names to Ranges

Excel provides several methods for naming ranges, two of which are briefly summarized
below.

1. Select the range to be named. Click the Name Box (see section 1.1.2 on page 5), type
the desired name and press the Enter key. Note that Excel will not allow the same
name to be assigned to multiple ranges using this approach.

Name Box

2. Select the range to be named, then click the Define Name button. Enter the desired
name in the New Name dialog box and confirm that the ‘Refers to’ address is correct
before pressing OK.

New Name Dialog Box

When using names in Excel it is important to note that there are limitations regarding the
definition of names when creating them.

For example, names cannot:

 Begin with numbers;

 Contain spaces; or

 Contain symbols apart from full stops (.) and underscores (_).

For a more complete discussion of Excel’s naming functionalities and requirements, see the
Microsoft Excel help documentation.

www.bestpracticemodelling.com Page 26 of 62
Basic Excel

Deleting Range Names

To delete a name from a range, select the range and activate the Name Manager command
(Formulas tab, Defined Name group) or using the keyboard shortcut Alt+M+N or Ctrl+F3.
Once the dialog box has opened, select the name to be deleted and press the Delete button.
Note that formula references to range names will be invalidated when the replaced range
names are deleted, so caution should be used before deleting names.

1.5.3 Potential Issues With Excel Names

Redundant Names

When a named range is deleted from a worksheet (e.g. as a result of deleting rows or
columns), the name itself will not be deleted from the workbook but will remain in the
workbook with an invalid “#REF!” reference, as shown below:

Redundant Names

Hence, redundant names should be deleted from a workbook to prevent confusion and
workbook corruption.

Names May be Transferred from Other Workbooks when Sheets are Copied Across

When a worksheet is copied from one workbook to another, all the names within that
worksheet are also copied across to the destination worksheet potentially creating duplicate
names in the destination worksheet. Furthermore, any references to names within formulas
are also copied which may result in incorrect calculations.

www.bestpracticemodelling.com Page 27 of 62
Intermediate Excel

Chapter 2
Intermediate Excel
2.1 Calculation Modes

2.1.1 Introducing Calculation Modes

What are Calculation Modes?

Excel’s calculation modes determine how the workbook recalculates the formulas within it.
Depending on the size and complexity of a workbook, using different calculation modes can
greatly vary the performance and practicality of that workbook.

The following table summarises the types of calculation modes:

Calculation Mode Description

Automatic Workbook will recalculate upon first open and every


time a cell or object is changed.

Automatic except for data Same as automatic mode except data tables only
tables recalculate upon manual command.

Manual Worksheet or workbook only recalculates upon


manual command.

Manual (recalculate Workbook will only recalculate automatically upon


workbook before saving) saving.

2.1.2 Changing Calculation Modes

How to Change Calculation Mode

To change the calculation mode of a workbook:

1. Click on the Office Button in the top left corner and select Excel Options (Alt+F+I);

2. In the Excel Options dialog box, select the Formulas tab; and

3. Under the Calculation options section, choose the desired calculation mode.

Where practical, it is recommended that the calculation mode of a workbook be set to


automatic. This minimizes the risk of confusion resulting from formulas developing results on
screen that are no longer correct because the workbook has not calculated.

In some cases, such as very large workbooks or workbooks that necessarily contain circular
references, automatic calculation may not be practical. In such cases, the use of the manual
calculation mode should be clearly communicated to workbook users to prevent confusion.

www.bestpracticemodelling.com Page 29 of 62
Intermediate Excel

How to Manually Recalculate a Workbook

If a workbook is set to manual calculation then any changes to the workbook will not
automatically be reflected in dependent cells and calculations. This will be evident when the
word “Calculate” is visible at the bottom-left of the Excel window:

Workbook Recalculate Required

The following table outlines the keyboard shortcuts used to force a re-calculation of a
workbook that is set to manual calculation mode:

Keyboard Shortcut Action

F9 Calculates all cells in all worksheets in all open


workbooks that are dependents of volatile or
changed data.

(Shift+F9) Calculates all cells in the active worksheet.

(Ctrl+Alt+F9) Calculates all cells in all worksheets in all open


workbooks.

2.2 Conditional Formatting

2.2.1 Introducing Conditional Formatting

What are Conditional Formats?

Conditional formatting refers to the situation where the format of a cell is conditional upon
the result of an evaluated test. Essentially, the purpose of conditional formatting is to change
the appearance of a cell based upon either:

 The value of the cell; or

 A logical formula.

Why use Conditional Formats?

Conditional formats are a potentially powerful tool for controlling the interaction between a
spreadsheet model and its user. Conditional formats are most commonly used to alert model
users to the occurrence of a particular value or outcome, such as an error.

However, the advanced model developer can employ conditional formats as a means of
significantly modifying the appearance of a model, and consequently, influencing the
behavior of model users. For example, conditional formatting can be used to hide information
that is not relevant at a given point in time.

www.bestpracticemodelling.com Page 30 of 62
Intermediate Excel

2.2.2 Applying Conditional Formats

How to Apply Conditional Formats

To create a conditional format, load the Conditional Formatting Rules Manager (Home tab,
Styles group, Conditional Formatting menu, Manage Rules command) via the keyboard
shortcut Alt+H+L+R. The Conditional Formatting Rules Manager dialog box will be displayed
as shown below:

Conditional Formatting Rules Manager

To apply a conditional format, click the New Rule button. This tool allows the user to specify
the format as being conditional upon several rules.

www.bestpracticemodelling.com Page 31 of 62
Intermediate Excel

Format Based on Cell Value

To format a cell based on its value, select the option ‘Format only cells that contain’. In the
first drop down box, select Cell Value. Choose a logic-based option in the second drop down
box and enter values in the cells to the right.

Format Based on Cell Value

Example Output

www.bestpracticemodelling.com Page 32 of 62
Intermediate Excel

Format Based on Designated Formula

To format a cell based on a designated formula, select the option ‘Use a formula to
determine which cells to format’ and enter a formula in the Rule Description. Note that the
formula entered must return a logical result - i.e. it should evaluate to either TRUE or FALSE.

Format Based on Designated Formula

Example Output

Having entered a conditional formula, click the Format button to specify the appropriate
format to apply once the formula returns TRUE. The following format areas can be applied as
conditional formats:

 Number;

 Font;

 Border; and

 Fill.

The following formats cannot be made conditional:

 Alignment;

 Number format; and

 Protection.

www.bestpracticemodelling.com Page 33 of 62
Intermediate Excel

It is important to note that the chosen format is only applied when the specified condition
returns a TRUE value.

Shading

To apply color shading to a range of cells based on their values, select the option ‘Format all
cells based on their values’ and in the Format Style drop down box, select either:

 2-Color Scale; or

 3-Color Scale.

Color Scales

Example Output

www.bestpracticemodelling.com Page 34 of 62
Intermediate Excel

Icon Sets

Cells can also be conditionally formatted using icon sets such as traffic lights. Select the
option ‘Format all cells based on their values’ and in the Format Style drop down box, select
Icon Sets.

Icon Sets

Example Output

Copying Conditional Formats

Conditional formats are copied with other cell formats and therefore copied when using
either the copy-and-paste or the copy-and-paste-special-formats methods.

Editing and Deleting Conditional Formats

To edit or delete conditional formats, click on the Edit Rule and Delete Rule buttons
respectively.

www.bestpracticemodelling.com Page 35 of 62
Intermediate Excel

2.3 Auditing Tools

2.3.1 Introducing Auditing Tools

What are Auditing Tools?

Excel has built-in auditing tools that allow users to trace precedent and dependent cells,
evaluate formulas and perform basic error checking.

Why use Auditing Tools?

Auditing tools can help to minimize the risk of error when constructing a model and allow
users and reviewers to efficiently understand the logic of formulas within the model.

2.3.2 Tracing Precedents & Dependents

What are Precedents and Dependants?

A precedent cell is a cell that is referenced by another cell in a formula, while a dependent
cell is one that references another cell via its formula. Consider a simple formula in cell A1:
‘= A2+A3’. In this example, cells A2 and A3 are precedent cells of cell A1, and cell A1 is a
dependent cell of both cells A2 and A3.

How to trace precedents and dependents

To trace the precedents or dependents of a cell:

1. Select the cell;

2. Select either Trace Precedents (Formulas tab, Formula Auditing group Alt+M+P) or
Trace Dependents (Formulas tab, Formula Auditing group, Alt+M+D); and

3. Arrows will appear showing the links to all precedents or dependents.

Example

To remove the arrows, select the Remove Arrows command (Formulas tab, Formula Auditing
group, Alt+M+A).

www.bestpracticemodelling.com Page 36 of 62
Intermediate Excel

2.3.3 Error Checking

What is an Error?

An error occurs when a formula does not return a valid result - e.g. dividing a number by
zero. When a formula returns an error, the cell containing that formula will return an error
value.

The following is a list of error values in Excel:

Error Value Description

#NULL! Two or more cell references are not separated correctly in a


formula, e.g. using a plus sign (+).

#DIV/0! The denominator in a division formula is the value 0 or is


blank.

#VALUE! A formula containing a mathematical operation is


referencing a cell containing text.

#REF! An invalid cell reference exists - e.g. a link to a cell that has
been deleted.

#NAME? A reference has been made to an invalid or non-existent


Excel name.

#NUM! A function contains an invalid argument.

#N/A A function returns no logical result.

An error that occurs in a cell may be transferred to its dependent cells via formulas.

Checking for Errors

To check for errors on a worksheet, select the Error Checking command (Formulas tab,
Formula Auditing group, Error Checking menu) or use the keyboard shortcut Alt+M+K+K.

If an error appears, choose from the options below to fix or ignore the error.

Error Checking

This tool will capture all errors on a worksheet, not just source errors (i.e. cells in which the
errors originated).

www.bestpracticemodelling.com Page 37 of 62
Intermediate Excel

2.4 Inserting & Using Controls

2.4.1 Introduction to Controls

What are Controls?

Controls are objects placed within Excel worksheets that control the way data is entered into
cells. Even new Excel users will be familiar with controls such as option buttons, check
boxes, list boxes and drop-down boxes because they are used throughout many common
Windows dialog boxes, such as the Print dialog box shown below:

Print Dialog Box Controls

Controls present a discrete set of options from which the user makes a decision.
Consequently, they represent powerful tools that allow the model developer to control the
bounds of a model user’s interaction with a spreadsheet model in a very discrete manner.

Common Controls

This section outlines the most commonly-used controls available in Excel. Each control may
be inserted by clicking their corresponding buttons (Developer tab, Controls group, Insert
menu). In Excel 2007 and later versions, the Developer tab is hidden by default. To show the
Developer tab, activate the Excel Options dialog box by pressing the Office button in the top
left corner, then Excel Options (Alt+F+I). In the Popular tab, check the box ‘Show Developer
tab in the Ribbon’.

www.bestpracticemodelling.com Page 38 of 62
Intermediate Excel

Each of these controls is shown in the following tables.

Lookups Appearance Description

Drop Down Box Allows the user to select from a pre-defined list of
options. Stays compact and shows only the current
value until selected.

List Box Allows the user to select from a pre-defined list of


options. All options are visible at all times.

Option Choosers Menu Button Description

Option Button Allows a single choice within a limited set of options,


usually those within a group box.

Group Box Used to group related controls together, such as


option buttons and check boxes.

Check Box Turns on or off a value, giving a TRUE or FALSE


result.

Incremental
Changers Menu Button Description

Spin Button Increases or decreases a value by clicking on the


arrows.

Scroll Bar Scrolls through a range of values by clicking either


the scroll arrows or the area between the scroll box
and an arrow.

Macro Callers Menu Button Description

Button Runs a macro that has been assigned to the button.

2.4.2 Benefits of Controls

Controls limit data entry to a set of choices pre-determined by the model developer, and
therefore greatly reduce the scope for confusion and error on the part of the model user. As
a result, controls serve to eliminate the likelihood of spurious results or model malfunction
courtesy of invalid assumptions. Additionally, the use of controls promotes visually
appealing, user-friendly interfaces.

In summary, the two primary benefits of controls are:

 Enhancement of the data entry interface; and

 Control of the data entry interface.

www.bestpracticemodelling.com Page 39 of 62
Intermediate Excel

2.4.3 Using Controls

Excel provides eight basic types of controls which should accommodate the needs of most
model developers. These controls can be inserted directly into worksheets, and are linked to
nominated cells (known as ‘Cell Links’) to control information flow.

Cell Link Example

To add a control, select the required control (Developer tab, Controls group, Insert menu)
and drag the mouse over the worksheet range over which the control is to be located.

To edit the properties of the inserted control, right click on the control and select the Format
Control option from the shortcut menu. The Format Control dialog box provides options
regarding the size, positioning, properties and control formats for the selected control, all of
which can be customized to suit particular requirements:

Format Control

www.bestpracticemodelling.com Page 40 of 62
Intermediate Excel

Example Uses for Controls

Each of the eight controls is suitable for specific situations, as outlined below.

 Required selection from a finite list:

– Drop down box; or

– List box

 Selection from a mutually-exclusive list of options:

– Option button + group box

 Boolean decision (i.e. Yes / No, Include / Exclude, TRUE / FALSE choice):

– Check box

 Increase or decrease a value by a known increment:

– Spin button; or

– Scroll bar

 Run a Visual Basic macro:

– Button

Cell Links

Where necessary, controls are linked to worksheets via cell links. These cell links provide an
interface through which the option chosen via the control can impact the model calculations.

Note that cell links must be unprotected (i.e. unlocked) if a worksheet is going to be
protected – otherwise the control will not work.

www.bestpracticemodelling.com Page 41 of 62
Intermediate Excel

2.5 Grouping & Hiding of Rows & Columns

2.5.1 Grouping vs. Hiding

What is Grouping & Hiding?

Excel provides several tools that allow model developers and users to control the level of
visible detail within a worksheet:

 Grouping (Outlining): Excel allows the user to group data within a worksheet in
either rows or columns to varying levels of detail. Once grouped, data can be collapsed
from view or expanded by clicking a button, as shown below:

Grouping Example – Collapsed View

 Hiding: There are a range of worksheet elements within Excel that can be hidden from
the model user’s view, including columns, rows, cell values, and even worksheets
themselves.

Why use Grouping & Hiding?

Grouping and hiding provides additional control over the information displayed to be within a
worksheet. Grouping and hiding data does not interfere with the data or calculation flow of
the worksheet, rather, they can be considered to act as a visual filter to help summarize data
to an appropriate level.

2.5.2 Hiding Rows or Columns

To hide or unhide a row or column:

1. Select the rows/columns to be hidden, or select the rows/columns to either side of the
hidden row/column to unhide; then

2. Select the desired option under the Hide & Unhide command (Home tab, Cells group,
Format menu).

When rows or columns are grouped or hidden, the borders applied to the cells within those
rows or columns will also disappear when these cells are compacted from view. Hence, when
applying borders to cells which are expected to be grouped or hidden, this outcome must be
borne in mind.

www.bestpracticemodelling.com Page 42 of 62
Intermediate Excel

To hide or unhide a worksheet:

1. Select the worksheet to be hidden or, if unhiding a worksheet, select any sheet; then

2. Select the desired option under the Hide & Unhide command (Home tab, Cells group,
Format menu).

Unhide Worksheets

Note: At least one worksheet must be visible at all times – i.e. it’s not possible to hide all the
sheets in a workbook.

www.bestpracticemodelling.com Page 43 of 62
Intermediate Excel

2.5.3 Grouping Rows or Columns

To group rows or columns:

1. Select the rows/columns to be grouped; then

2. Select the Group command (Data tab, Outline group, Group menu).

Excel will create an outline around the grouped rows or columns so that they are readily
identifiable. To collapse or expand detail, simply click the outline symbols positioned next to
each group.

Grouping Example – Expanded View

Grouping Example – Intermediate View

Grouping Example – Compact View

www.bestpracticemodelling.com Page 44 of 62
Intermediate Excel

To ungroup the same rows/columns:

1. Select the rows/columns that are to be ungrouped; then

2. Select the Ungroup command (Data tab, Outline group, Ungroup menu).

2.5.4 Benefits of Grouping over Hiding

Hidden rows and columns are difficult to detect unless row and column headers are closely
analyzed. On the other hand grouping levels are always shown to the left or above the row
and column headers respectively. Furthermore, grouped rows and columns can easily be
collapsed and expanded.

Note that when worksheets are protected, other users cannot expand or collapse grouped or
hidden rows and columns unless that worksheet is unprotected first. This provides an easy
way of hiding data from other users but may also create undesired problems if not taken into
account before applying protection to a worksheet.

Grouping & Hiding Keyboard Shortcuts

Keyboard Shortcut Command

Alt+Shift-Right arrow Group or increase outline level.

Alt+Shift-Left arrow Group or decrease outline level.

Ctrl+8 Displays or hides outline symbols.

Ctrl+9 Hides selected rows.

Ctrl+0 Hides selected columns.

Ctrl+Shift-9 Unhides any hidden rows within the selection.

Ctrl+Shift-0 Unhides any hidden columns within the selection.

2.6 Hyperlinks

2.6.1 Introduction to Hyperlinks

What are Hyperlinks?

Users are likely to be familiar with the use of hyperlinks as a means of navigating the
internet. A hyperlink is a link from a document that opens another page or file when clicked,
and essentially provides a shortcut for the quick movement between two locations. The
hyperlink destination can vary - it may be a web page, picture, e-mail address, or a
program. Within the context of an Excel spreadsheet, hyperlinks are most commonly used to
link to:

 Areas on the same worksheet;

 Worksheets within the same workbook;

 Different workbooks; or

 A website.

www.bestpracticemodelling.com Page 45 of 62
Intermediate Excel

Why use Hyperlinks?

Hyperlinks can be advantageous if included in spreadsheet models as they provide a very


fast and flexible means of navigation. Hyperlinks in general are intuitive and logical to use
for both model developers and model users. More importantly, hyperlinks can turn a simple
spreadsheet model into a professional and sophisticated product more akin to a web page in
presentation than a standard Excel model.

2.6.2 Inserting Hyperlinks

Although hyperlinks are generally associated with text, Excel also allows hyperlinks to be
created from graphic objects such as shapes or pictures. For the purposes of this discussion
we will consider only text hyperlinks, however, the process for creating hyperlinks from
objects is very similar.

The main method of creating a text hyperlink within Excel is by accessing the Hyperlink
command (Insert tab, Links group) which will activate the Excel Insert Hyperlink dialog box
(Alt+N+I). This dialog box provides a range of options concerning the type of hyperlink to
insert, and requires the user to specify the file or destination to which the inserted hyperlink
will take them, as shown below:

Insert Hyperlink Dialog Box

2.6.3 Hyperlink Properties

When inserted, a hyperlink has three main properties:

 Displayed text;

 Cell reference; and

 Screen tip.

The displayed text of the hyperlink is the text which represents the hyperlink itself. The cell
reference of a hyperlink is the destination cell of the hyperlink, i.e. where the selection will
move to when the hyperlink is clicked on, and the screen tip is the text which appears when
the pointer hovers over the hyperlink.

www.bestpracticemodelling.com Page 46 of 62
Intermediate Excel

These three properties are shown in the following hyperlink example:

Hyperlink Example

2.7 Protecting Sheets & Workbooks

2.7.1 Different Levels of Protection

Excel provides two primary levels of workbook protection:

1. Worksheet protection: Protects content within worksheets. The user can prevent
others from inserting, deleting, and formatting rows and columns, from changing the
contents of locked cells, and from selecting certain cells.

2. Workbook-level protection: Prevents unauthorized access to workbooks and/or the


editing of the structure of workbooks. Workbook open and modification protection can
also be applied but these concepts are not discussed in this section.

2.7.2 Benefits of Security & Protection

The benefits of security and protection are self-explanatory. The model developer can ensure
the ongoing integrity of the structure and content of a spreadsheet by limiting inadvertent or
deliberate modification – a potentially crucial function if a model is to be disseminated widely
for use and/or the model output is central to decision-making processes. Further, they can
also limit unauthorized access to potentially sensitive information and/or the calculation
formulas that derive it.

In summary, the two primary benefits of protecting workbooks and sheets are:

 Controlling data entry into worksheets; and

 Controlling model changes.

www.bestpracticemodelling.com Page 47 of 62
Intermediate Excel

2.7.3 Workbook Protection

To protect a workbook, use the Protect Workbook command (Review tab, Changes Group) or
the keyboard shortcut Alt+R+P+W. The Protect Structure and Windows dialog box will
appear as shown below:

Protect Workbook Dialog Box

Checking Structure in the above protects the workbook such that worksheets cannot be
deleted, inserted, renamed or moved. Checking the Windows checkbox protects the
workbook such that workbook windows cannot be moved, resized, hidden, unhidden or
closed. Note that the use of a password is optional.

2.7.4 Sheet Protection

To protect a sheet, use the Protect Sheet command (Review tab, Changes group) or the
shortcut key sequence (Alt+R+P+S). The Protect Sheet dialog box is shown below:

Protect Sheet Dialog Box

There are a number of options when protecting worksheets, although these vary depending
on the version of Microsoft Excel being used. Users may be restricted in what actions they
are able to perform on a protected worksheet.

www.bestpracticemodelling.com Page 48 of 62
Advanced Excel

Chapter 3
Advanced Excel
3.1 Data Validation

3.1.1 Introduction to Data Validation

What is Data Validation?

Data validation is used to prevent invalid data from being entered into a cell, which helps to
protect the integrity of a spreadsheet model by avoiding the inclusion of incorrect,
unreasonable or illogical data.

Data Validation Dialog Box

To active the Data Validation dialog box, select the Data Validation command (Data tab, Data
Tools group, Data Validation menu) or use the keyboard shortcut Alt+A+V.

Data Validation Dialog Box

By default, cells will have no data validation applied and under the Allow drop down box, the
‘Any value’ option will be selected.

www.bestpracticemodelling.com Page 49 of 62
Advanced Excel

3.1.2 Applying Data Validation

Types of Data Validation

Using data validation, data entry can be limited to allow one of:

 Whole number;

 Decimal;

 List;

 Date;

 Time;

 Text length; or

 Custom.

For example, to restrict the value in a cell to a whole number between ‘0’ and ‘100’, the Data
Validation dialog box would be populated as follows:

Data Validation Example

www.bestpracticemodelling.com Page 50 of 62
Advanced Excel

List Data Validation

Cell values can be restricted to a pre-defined list, for example a list of week days. In the
Data Validation dialog box, allow ‘List’ and in the Source ref edit, enter the address of the list
range, as shown below:

Data Validation List Example

If the ‘In-cell dropdown’ check-box is checked, when a cell within the list validation range is
selected an in-cell dropdown box will appear with the list of possible entries, as shown
below:

In-Cell Dropdown Example

www.bestpracticemodelling.com Page 51 of 62
Advanced Excel

Input Message

An input message may be created and shown when a cell with data validation is selected. To
create an input message, select the Input Message tab and type in a custom message as
shown below:

Input Message Dialog Box

Input Message Example

www.bestpracticemodelling.com Page 52 of 62
Advanced Excel

Error Alert

A customized error alert can be created and be set to display if the user enters invalid data
into a data validated cell. Select the Error Alert tab and type in an error message as shown
below:

Input Message Dialog Box

When the user attempts to enter incorrect data then the alert will appear:

Data Validation Error Message

3.2 Data Tables

3.2.1 Introduction to Data Tables

What are Data Tables?

Data tables are part of Excels What-If Analysis tools. What-if analysis is the process of
changing the values of certain assumption cells to see how these changes affect the outputs
of calculations that ultimately reference these cells. Excels data tables allow for one or two
variables to be changed.

Why Use Data Tables?

Data tables are a simple and efficient way of analyzing the sensitivity of one or two
assumption variables to a formula result without taking up excessive, continual calculation
time or workbook space.

www.bestpracticemodelling.com Page 53 of 62
Advanced Excel

3.2.2 Creating Data Tables

One-variable Data Tables

One-variable data tables are used to understand how changes in the value of one variable
will affect formulas that reference that variable. For example, a one-variable data table can
be used to see how changes in volume (while keeping price constant) affects revenue, by
using a simple multiplicative equation.

In the following example, cell F3 contains the revenue formula, =C2*C3.

Revenue Formula Example

A one-variable data table has assumption values that are listed either down a column
(column-oriented) or across a row (row-oriented). Formulas must only refer to one
assumption cell.

To create the data table:

1. Select the range of cells that contains the formulas and assumption values that will be
substituted (in this case it will be the range E3:F8);

2. Select the Data Table command (Data tab, Data Tools group, What-If Analysis menu)
or use the keyboard shortcut Alt+A+W+T;

3. As the assumption values in this example are column-oriented, enter the address of
the assumption cell (in this case C2) into the column input cell box; and

Data Table Dialog Box

4. Leave the row input cell box blank and click OK.

www.bestpracticemodelling.com Page 54 of 62
Advanced Excel

One-Variable Data Table Example

Revenue has been calculated in column F for changes in volume in column E. As shown,
Excel has inserted an array formula into the data table.

Two-variable Data Tables

A two-variable data table uses a formula that contains two lists of assumption values, which
must refer to two different assumption cells.

Revenue Formula Example

A two-variable data table has assumption values that are listed both down a column
(column-oriented) and across a row (row-oriented). Formulas must refer to two assumption
cells.

To create the data table:

1. Select the range of cells that contains the formulas and assumption values that will be
substituted (in this case it will be the range E3:J8);

2. Select the Data Table command (Data tab, Data Tools group, What-If Analysis menu)
or use the keyboard shortcut Alt+A+W+T;

3. Enter the address of the column-oriented assumption cell (in this case C2) into the
column input cell box; and

4. Enter the address of the row-oriented assumption cell (in this case C3) into the row
input cell box and click OK.

Data Table Dialog Box

www.bestpracticemodelling.com Page 55 of 62
Advanced Excel

Two-Variable Data Table Example

Revenue has been calculated in the range F4:J8 for changes in volume in column E, as well
as changes in price in row 3. Similar to the one-variable example, Excel has inserted an
array formula into the data table.

3.3 Data Tools

3.3.1 PivotTables

Introducing PivotTables

Pivot tables are an efficient way to summarise large amounts of data in a number of ways.
Raw data that appears in multiple columns can be easily manipulated to appear in a report
format, allowing the user to sort and filter data by multiple categories.

Creating a PivotTable

To create a PivotTable:

1. Highlight the range of raw data (including column headings);

Highlight Raw Data

2. select the PivotTable command (Insert tab, Tables group, PivotTable menu) or use the
keyboard shortcut Alt+N+V+T;

www.bestpracticemodelling.com Page 56 of 62
Advanced Excel

Create PivotTable Dialog Box

3. Choose the location for the PivotTable to be inserted and click OK;

4. The Pivot Table Field List will appear and data can be manipulated by dragging each
field into a particular area (see example below); and

Pivot Table Field List

www.bestpracticemodelling.com Page 57 of 62
Advanced Excel

5. The data will be summarised in a report format, as shown below:

Pivot Table Example

Once created, a PivotTable can be easily customized to view data in different ways. For
example, by right clicking on any cell within the PivotTable and changing the option under
‘Summarize Data By’, the model user can choose to view the data in different forms, such as
the sum of all values, the average of all values or the number of values that exist.

In the PivotTable Field List, data fields can be dragged between different areas and column
labels and row labels to manipulate the report structure. It is recommended that the user
experiment with different field placements and combinations in order to create a tailor-made
report.

Refreshing a Pivot Table

Pivot tables do not refresh automatically, even if a workbook is recalculated using a shortcut
key such as F9. To refresh a PivotTable, right click on any cell within the PivotTable and
select the refresh option.

3.3.2 Excel Tables

Introducing Excel Tables

Excel tables allow for greater functionality when working with large amounts of data, by
allowing the data to be accessed and referenced quickly and efficiently in formulas.

Creating a Table

To create a Table:

1. Select the cells containing the raw data;

2. Select the Table command (Insert tab, Tables group) or use the keyboard shortcut
Alt+N+T and click OK; and

www.bestpracticemodelling.com Page 58 of 62
Advanced Excel

3. The selected region will be automatically formatted in excels table format, as shown
below:

Excel Table Example

Benefits of Using Tables

Tables are particularly useful when the data within them is referenced by an external formula
such as INDEX or SUMPRODUCT as the range is automatically updated.

Benefits of tables include:

 Formulas outside of the table that refer to the contents of a table will automatically
contract or expand its range if data is removed or added to the table;

 If there are formulas within the table itself, the cells containing the formulas will
automatically contract or expand when data is removed or added to the table;

 New data that is added to the table will automatically be formatted in the same way as
the existing data in the table; and

 The source range for any PivotTables that refer to the table will automatically update if
the table range is contracted or extended (note that the PivotTable still needs to be
refreshed).

www.bestpracticemodelling.com Page 59 of 62
Advanced Excel

3.3.3 Sorting & Filtering

Introducing Sorting and Filtering

Excels sort and filter functions are effective ways to view large amounts of data in a logical
structure, and to view only selected categories of data.

Sorting Data

To sort data:

1. Select a cell within a data range;

2. Select the Sort command (Data tab, Sort & Filter tab) to activate the Sort dialog box,
or use the keyboard shortcut Alt+A+S; and

3. Data within each column can then be sorted based on a range of criteria.

Typically, columns that contain text will be sorted alphabetically, while columns containing
numerical values will be sorted by size. In each case, data can be sorted in ascending or
descending order.

Data may also contain multiple layers of sorting as indicated below. To create a new level,
click the Add Level button in the dialog box. Once multiple levels have been created, they
can be moved up or down depending on their order of priority.

Sort Dialog Box

www.bestpracticemodelling.com Page 60 of 62
Advanced Excel

Filtering Data

The following data will be used for a filtering example:


Sort Example

To filter data:

1. Select a cell within a data range;

2. Select the Filter command (Data tab, Sort & Filter tab) to activate filtering, or use the
keyboard shortcut Alt+A+T; and

3. Click on one of the filter icons that will appear at the top of the data (see below) to
view the available filter options, as shown below:

Filter Options

www.bestpracticemodelling.com Page 61 of 62
Advanced Excel

Once filtering has been applied, all rows of data that have been excluded by the data will be
hidden and the row numbers of the remaining rows will appear in blue font. The filter icon
will appear different in the column to which filtering has been applied to as shown below:

January-Only Filter Example

Filter Options

Multiple filter options are available. The most basic filter is a simple include/exclude check
box for each selection. Text can also be filtered by their content, such as the start or end
character(s), or any characters within the text string. Numbers can be filtered by their value,
for example greater than or less than a specified value, or by a relative ranking within a list,
for example the top 10 values.

www.bestpracticemodelling.com Page 62 of 62
Other Best Practice Modelling publications…

Standards Standards
Tabulated Listing Commentary & Examples

bpmToolbox bpmModules
User Guide User Guide

Business Planning Time Series Analysis


Modular Development Fundamentals

www.bestpracticemodeling.com
BPM Financial Modelling
Phone: +613 9244 9800
Email: info@bpmglobal.com
www.bestpracticemodelling.com

You might also like