BPM Excel Fundamentals
BPM 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).
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
www.bestpracticemodelling.com Page 1 of 62
Excel Fundamentals
www.bestpracticemodelling.com Page 2 of 62
Excel Fundamentals
www.bestpracticemodelling.com Page 3 of 62
Basic Excel
Chapter 1
Basic Excel
1.1 Introduction to Excel
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.
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
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.
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:
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.
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.
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.
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.
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:
www.bestpracticemodelling.com Page 7 of 62
Basic Excel
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.
Content within ranges can be moved and copied using Excel’s cut, copy and paste
commands.
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.
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:
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.
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
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.
These keyboard shortcuts are consistent across all applications in the Microsoft Office Suite.
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
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:
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
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:
Fraction None ¼
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
Custom number formats can be applied by selecting the Custom category within the Number
tab of the Format Cells dialog box, as shown below:
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
Example
Date Code Description Format Example Presentation
Example
Time Code Description Format Example Presentation
www.bestpracticemodelling.com Page 14 of 62
Basic Excel
Example
Time Code Description Format Example Presentation
Example
Other Code Description Format Example Presentation
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.
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:
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.
www.bestpracticemodelling.com Page 16 of 62
Basic Excel
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
‘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 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:
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.
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.
=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’.
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:
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:
* Asterisk Multiplication
www.bestpracticemodelling.com Page 19 of 62
Basic Excel
This section introduces and explains the use of functions within formulas and provides tips
for more efficient formula creation.
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.
= Function (Argument_1,Argument_2,…)
Generally, functions contain 4 parts:
1. Function name;
2. Opening parenthesis;
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.
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:
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:
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.
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:
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:
www.bestpracticemodelling.com Page 22 of 62
Basic Excel
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.
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:
The following table shows how formulas which combine the cell data and text can create
useful output:
Formula Result
=A1&" has "&A2&" apples while "&A3&" only has "&A4 Richard has 10 apples while Stacey only has 5
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
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)
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
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:
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.
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
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.
When using names in Excel it is important to note that there are limitations regarding the
definition of names when creating them.
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
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.
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
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.
Automatic except for data Same as automatic mode except data tables only
tables recalculate upon manual command.
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.
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
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:
The following table outlines the keyboard shortcuts used to force a re-calculation of a
workbook that is set to manual calculation mode:
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:
A logical formula.
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
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:
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
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.
Example Output
www.bestpracticemodelling.com Page 32 of 62
Intermediate Excel
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.
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.
Alignment;
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
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.
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
Excel has built-in auditing tools that allow users to trace precedent and dependent cells,
evaluate formulas and perform basic error checking.
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.
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.
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
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
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.
#REF! An invalid cell reference exists - e.g. a link to a cell that has
been deleted.
An error that occurs in a cell may be transferred to its dependent cells via formulas.
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
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:
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
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.
Incremental
Changers Menu Button Description
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.
www.bestpracticemodelling.com Page 39 of 62
Intermediate Excel
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.
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
Each of the eight controls is suitable for specific situations, as outlined below.
– List box
Boolean decision (i.e. Yes / No, Include / Exclude, TRUE / FALSE choice):
– Check box
– Spin button; or
– Scroll bar
– 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
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:
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.
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.
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
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. 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.
www.bestpracticemodelling.com Page 44 of 62
Intermediate Excel
2. Select the Ungroup command (Data tab, Outline group, Ungroup menu).
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.
2.6 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:
Different workbooks; or
A website.
www.bestpracticemodelling.com Page 45 of 62
Intermediate Excel
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:
Displayed text;
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
Hyperlink Example
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.
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:
www.bestpracticemodelling.com Page 47 of 62
Intermediate Excel
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:
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.
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:
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
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.
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.
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
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:
www.bestpracticemodelling.com Page 50 of 62
Advanced Excel
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:
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:
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:
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:
When the user attempts to enter incorrect data then the alert will appear:
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.
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
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.
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.
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
4. Leave the row input cell box blank and click OK.
www.bestpracticemodelling.com Page 54 of 62
Advanced Excel
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.
A two-variable data table uses a formula that contains two lists of assumption values, which
must refer to two different assumption cells.
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.
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.
www.bestpracticemodelling.com Page 55 of 62
Advanced Excel
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.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:
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
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
www.bestpracticemodelling.com Page 57 of 62
Advanced Excel
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.
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.
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:
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:
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.
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
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:
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.
www.bestpracticemodelling.com Page 60 of 62
Advanced Excel
Filtering Data
To filter data:
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:
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
www.bestpracticemodeling.com
BPM Financial Modelling
Phone: +613 9244 9800
Email: info@bpmglobal.com
www.bestpracticemodelling.com