CHAPTER 5
Using Excel in Financial Modelling

IIn this chapter, we take a look at some of the practical tools, functions, and formulas commonly used in financial modelling in Excel.

FORMULAS AND FUNCTIONS IN EXCEL

Excel now contains close to 500 different formula codes, called functions. The most commonly used function is SUM, which totals a range of cells. Most Excel users only use a very small percentage of the available functions, and many of them are irrelevant for use in finance and financial modelling. It is impossible to go over all of them here, but we will cover the ones that are going to be the most useful in using Excel for business analysis and financial modelling.

In most cases, you will find it easiest to use the Insert Function dialog box, accessible via the Insert Function button on the Formulas tab as shown in Figures 5.1 (for Windows) and 5.2 (for Mac). Alternatively, you can hit the little fx icon located to the left of the formula bar.

Excel window displaying the selected Formulas tab and Insert Function button and a popped-up Insert Function dialog box. The dialog box has a highlighted function [[FCN_TEXTAFTER]] and OK and Cancel buttons.

FIGURE 5.1 Insert Function Dialog Box

Excel window for Mac displaying the selected Formulas tab and Insert Function button and a popped-up Formula Builder box. The box has a search box and list of most recently used function. The SUM function in is highlighted.

FIGURE 5.2 Formula Builder in Excel for Mac

Note that the Insert Function dialog box (which used to be called the Function Wizard in previous versions of Excel) is called the Formula Builder in Excel for Mac; however, we will refer to it as the Insert Function dialog box in this book for consistency.

It's fair to say that some Excel users simply use the tool as a fancy calculator. If so, you'd be just using a formula in Excel, such as images. This is fine, but in order to build financial models, you'll need to do a lot more than that! There are many predefined formulas in Excel, such as IF, SUM, VLOOKUP, INDEX (and several hundred more). These are referred to as functions.

So, you could write a formula containing a function, like images, or you could just write a simple formula that does not contain a function, like images. Many of us use the words formula and function interchangeably, but they do have slightly different meanings.

Because there are so many hundreds of functions in Excel, you should familiarise yourself with as many as possible, so that you know what is available.

For use in business and financial modelling, the most useful functions fall into the categories of logical, aggregation, lookup, and financial. The most commonly used functions in financial modelling are listed here:

  • Logical functions (IF, AND, etc.) are used when you need to evaluate a condition. For example: “Shall we include tax in our calculation?” If the user enters yes, the calculation will include the tax; if no, it is excluded. Aggregation functions (SUMIF, COUNTIF, etc.) are helpful when there is a lot of data arranged either vertically or horizontally that must be added together.
  • Lookup functions (HLOOKUP, VLOOKUP, etc.) are used when you need to look up a value to return a single amount.
  • Financial functions (NPV, IRR, PMT, etc.) can usually be created manually using a long and complicated formula, but the predefined function in Excel saves time and makes it much easier to calculate commonly used financial calculations such as net present value, interest payments, or depreciation amounts.

Choose the Simplest Solution

There is a lot more to becoming a skilled modeller, however, than simply knowing lots and lots of functions in Excel. Often there are several functions which will achieve the same or similar results, so choosing the right function in the correct context takes practice. Use the simplest formula to perform the task you need it to do. Choose one that is not overly complicated and don't try to do too much in one cell. If it starts getting difficult to decipher, consider breaking the formula into several parts. See “How Long Should a Formula Be?” in Chapter 4 for an example of this.

As with most tools in financial modelling, you should choose the simplest option—not because you don't know how to do a more sophisticated function, but because you want to make the model as clear, simple, and transparent as possible. However, you still need to arm yourself with as many different functions as possible. Thus, the more you know, the more options you have available to you, and the more likely you are to find the best solution.

For example, Figure 5.3 shows the calculation of a compound growth rate when escalating the starting sales number by 5 percent to the power of the year. In order to do this, we've had to insert a helper row to link to. This makes the formula easier to follow, but a helper row is distracting and makes the model look messy, so it needs to be hidden. The entire row cannot be hidden in this instance, so we'd probably change the font to a pale grey to make it less distracting.

Excel spreadsheet displaying compounding growth rate calculation using a helper row with numbers 1, 2, 3, 4 and 5. Cell C5 ($5,266) is highlighted. The formula =$B$5*((1+$B$2)˄C2) is indicated in the formula bar.

FIGURE 5.3 Compounding Growth Rate Calculation Using a Helper Row

Alternatively, we can achieve the same result without the helper row, as shown in Figure 5.4, by calculating it all in one cell. Instead of inserting 1, 2, 3, and so on across the top, we can do the entire calculation in one cell by looking at the difference between the years; in this case, 2020 minus 2020 equals zero, and 2021 minus 2020 equals one, and so on.

Excel spreadsheet displaying compounding growth rate calculation without a helper row. Cell C5 ($5,266) is highlighted. The formula =$B$5*((1+$B$2)˄(C4-$B$4)) is indicated in the formula bar.

FIGURE 5.4 Compounding Growth Rate Calculation Without a Helper Row

Using the second method, the value 1 in the helper row has been replaced by the formula (C9-$B$9). This makes the second formula more difficult to follow, but the model is less cluttered.

This is an example of how a modeller needs to strike the balance between having a streamlined model, yet with formulas that are easy to follow.

Either of these methods would be perfectly acceptable, but as this is not a terribly long or complicated formula, the second option is preferable in my opinion because it avoids the addition of a potentially confusing helper row. For more detail on using different escalation methods in financial models, see the section on “Escalation Methods for Modelling” in Chapter 9.

EXCEL VERSIONS

There are currently still several different versions of Excel available in Microsoft Windows that modellers are likely to be using. Each time an updated version of Excel is launched, new features are introduced and subtle changes in the look and feel take place. The biggest change was way back when the big jump from Excel 2003 to 2007 occurred. The introduction of the ribbon and change of file types caused all sort of difficulties for heavy-duty Excel users, financial modellers included. In the versions since then, the changes have been somewhat less traumatic for users and in recent years Microsoft has been moving towards a subscription-based model, making the changes incrementally rather than all at once.

What is the Difference Between a Perpetual and a Subscription-Based Licence?

Historically, Microsoft has always sold a “perpetual” licence that is purchased outright and owned forever. With this type of licence, the user does not receive any updates to their software until the next version is released and installed. Large organisations with many users that have purchased perpetual licences often wait several years before upgrading—due to the cost—and are usually at least one or two versions behind. This means that at any one time there has always been a wide range of versions in use in the general community. It is not unusual for me to run a public training course and have three or four different versions of Excel being used by different participants in the class. As a consultant, I have always had to take care to find out the oldest version of Excel the client is likely to be using and make sure that I don't use any features or functions in the model that won't work in their version of Excel.

Users with perpetual licences understandably become impatient because they don't have access to new features they have seen or heard about, or because they cannot view or use the new features those with later versions have included in a model. When the upgrade finally does happen, the updates so eagerly anticipated by some can cause confusion and frustration for others, either because they dislike the sudden new look or can't find what they are looking for.

With subscription-based Office 365, updates are regularly released and any changes are gradual, which makes it easier for users to become accustomed to the differences. Organisations on the subscription model can choose their “update channel”, which will determine how often updates are made, either monthly or semi-annually. In theory, all versions should be the same, but these differences in the frequency of updates mean that not all users receive the updates at the same time.

Whilst it is possible to purchase an Excel 2019 licence, Microsoft is strongly encouraging users and organisations to take up the subscription option, presumably because they prefer the recurring revenue and stable cash flow it generates. As more organisations move to this model, the compatibility problem of users being on different versions will become less of an issue and should make my life as a trainer and consultant a lot easier! To seal the deal, Microsoft announced in 2017 than those running Office 2016 on a perpetual licence will be unable to connect to Microsoft's cloud-based services after 2020, and I expect 2019 will have similar limitations. It seems likely that Office 2019 will be the last version that Microsoft offers as a perpetual licence.

Excel Version Compatibility

If you are building financial models or spreadsheets in Excel that other people with prior versions need to use, then you need to find out which version of Excel they are using and consider their version capabilities when building your models. For example, a model containing a TreeMap chart will simply not show at all in a version of Excel prior to 2016—in fact, all they will see is a white, blank square where the chart should be. Some of the biggest culprits are often new functions—it's very frustrating to build a model with a TEXTJOIN function, only to discover that the model user sees a #N/A error instead of the function result. For this reason, you'll save yourself some trouble when building a model if you don't include features in the first place that are not supported in the version of Excel in which it might be used. The problem is that we don't often know which features are included in which version.

To help you with this, here are some of the features that were introduced in various versions over the past decade or so.

Excel 2019/365    The following features were introduced in Excel 2019 or for those with an Office 365 subscription:

  • Custom visuals, such as word clouds, bullet charts, and speedometers, which were previously only available in Power BI. (Note, as with many features of Excel, just because you can doesn't necessarily mean that you should.)
  • Microsoft Office now has full SVG graphics support plus the Excel application has 500 built-in icons. These are now supported, which look great on dashboards and infographics.
  • The Insights feature has been expanded upon. Click on a table of data and by selecting Insights from the Insert tab, several charts will appear on the right-hand side of the page to give you “insights” into your data. This is probably more of a data analysis tool than one for financial modelling, but still rather handy.
  • 3D Models, which are fun, but I struggle to find a use-case for them in financial modelling.
  • You can create your own custom functions using JavaScript. It's always been possible to create user-defined functions using VBA, but JavaScript allows for greater interconnection. Again, this is probably not necessary for the garden-variety financial model.
  • Excel connects to Flow, which you can use to create automated workflows to automatically collect data or synchronise data sources. This is particularly useful for automating data refreshes for models that need to be constantly updating, such as stock prices or currency exchange rates.
  • Excel also connects to Forms, so you can have a nice form user interface, with a very easy-to-use tool, that can be shared through a link.
  • Lots of new functions; most notably, IFS, SWITCH, TEXTJOIN, MAXIFS, and MINIFS.
  • Map & funnel charts; the latter is just a centred bar chart, but map charts allow you to display data on a map using countries, states, provinces, and even zip codes/postcodes. You can either display numbers as a heat map or colour coded.
  • Lots of new features in Excel's ground-breaking Power Query data cleansing feature, including parameters, conditional columns, and new transformations. Note also the name “Power Query” was changed to Get & Transform for Excel 2016 but has now reverted to Power Query, presumably to fit with the rest of the “Power suite”: Power Pivot, Power BI, etc.
  • Multiple users can edit at the same time with co-authoring if a file is stored on SharePoint or OneDrive.
  • Multiple comments can be made in a cell with threaded comments. See the section “In-Cell Comments” in Chapter 3 for more information.
  • If you regularly change your preferences for PivotTables, you can now assign a default behaviour for PivotTables.
  • Previously, cells only contained a single, flat piece of text upon which formatting can be applied. With new AI-powered online data types, a cell could have a region or country value from which more information—such as the population, capital city, area, and many more details—can be extracted. The first two data types supported are Geography and Stocks, with more promised.

Note that you must have either Excel 2019 or Excel 365 to use the tools listed above. If a model containing any of these new features is opened in a previous version of Excel, in most cases you'll be able to view the feature, just not make any changes to it. With new functions, however, the formula will simply stop working if opened in a non-compatible version of Excel, which will undermine the functionality of the model—unless viewed using Excel Online. So, if you are building models in Excel that other people with prior versions need to use, then you need to consider the version capabilities as you build.

Excel 2016    Lots of new features were introduced in Excel 2016 and here are some of the most useful:

  • Forecast Sheet. The ordinary FORECAST or TREND functions are very useful for forecasting along a linear trend in previous versions of Excel, but if you want to create a forecast based on seasonality, then it's quite a detailed process. The new Forecast Sheet feature makes it very easy to forecast based on historicals, including seasonality, and you can even apply confidence intervals to your forecast. See Chapter 6 for more detail on how to use this tool.
  • Additional chart types—such as Waterfall Charts, Histograms, Pareto, Box Plots (Box & Whisker), TreeMap, and Sunburst.
  • Better analysis in PivotTables and PivotCharts. PivotTables handle dates and times even better than they did before with automatic grouping, and you can drill down directly into PivotCharts with new plus and minus buttons.
  • Power Query (Get & Transform) is now on the Data tab so no need to install it.

Excel 2013    Similarly, here are some of the most useful features that were added in Excel 2013:

  • Flash Fill to learn the pattern of the data you're entering and complete it for you.
  • Quick Analysis makes it easy to analyse your data with formatting and charts after highlighting with the mouse.
  • Chart Recommendations and Customisations; data labelling using “value from cells” and the way that the chart is built changed. The only notable new chart type was the Combo Chart (a chart combining both a line and a column chart on two separate axes), which doesn't cause compatibility issues.
  • PDURATION() returns the number of investment periods required for the invested amount to get to the specific value.
  • IFNA() allows you to suppress a #N/A error only.
  • ISFORMULA() will return the value TRUE if the cell contains a formula.
  • FORMULATEXT(); when linked to a cell with a formula, it displays that formula. This can be a useful auditing tool.
  • Single window per worksheet allows the same session of Excel to show different files on multiple monitors (my personal favourite).
  • New web-based functions help in building links to web services, reading XML content, and connecting with online content.
  • You can create relationships between tables for enhanced data analysis without having to consolidate all the information into a single table and create PivotCharts.
  • Slicers, previously only available for PivotTables, became available in Excel tables as well.
  • A timeline also became available for PivotTable. Similar to a slicer, the timeline allows filtering by dates.
  • Power Pivot became a built-in feature of Excel 2013.

Excel 2010    The following features were introduced in Excel 2010:

  • Power Pivot was first available as an add-in (see Chapter 1).
  • Sparklines (see Chapter 7).
  • Slicers in PivotTables (see Chapter 8).
  • The AGGREGATE function.
  • An overhaul of statistical functions.

Which Features Cause Compatibility Problems?    Below is a summary of commonly used new features which were first introduced in different versions and should be avoided, depending on which version your user has. Of course, you don't need to worry about avoiding any of these if everyone who might possibly ever open the model is using the same version of Excel. If it's a financial model only used internally, and your entire company is on Office 365, then go ahead and use IFS or SWITCH to your heart's content. But if you have cause for concern regarding compatibility, then you should avoid new features which were first introduced in a version more recent than the one your model users are on.

Version Feature
Excel 2019/365
  • Custom visuals
  • New functions, such as:
    • IFS
    • SWITCH
    • TEXTJOIN
    • MAXIFS
    • MINIFS
Excel 2016
  • Forecast Sheet (because of the functions used, such as FORECAST.ETS)
  • New chart types, such as:
    • Waterfall Charts
    • Histograms
    • Pareto
    • Box & Whisker
    • TreeMap
    • Sunburst
Excel 2013
  • Slicers were introduced to tables as well as PivotTables
  • New functions, such as:
    • PDURATION()
    • IFNA()
    • ISFORMULA()
Excel 2010
  • Slicers for PivotTables
  • Sparklines

As more users move towards Excel 365 subscriptions, compatibility issues will become less of a problem. For more detailed explanations of the changes between versions and how they impact model building, please see www.plumsolutions.com.au/book to download supplementary material in PDF format. This section also discusses the difference between using Windows and Mac for financial modelling.

This book assumes readers are using Windows Excel 2019, but in most cases, instructions for previous versions and Excel for Mac have also been provided.

HANDY EXCEL SHORTCUTS

Working in Excel—particularly for the purpose of financial modelling—can be very time-consuming; increasing your speed and accuracy will increase productivity significantly. Excel users just starting out with Excel would be very comfortable with using the mouse for navigation and editing purposes. However, with growing familiarity, the mouse is not the fastest or most efficient way of modelling. Excel offers a lot of shortcuts to tackle this problem, and as you become faster, you will find them very handy.

There are many advantages to using Excel shortcuts:

  • Ease of use. Whilst intuitively it may seem that a mouse is a more comfortable option, it is a lot more comfortable for your wrist, arm, and shoulders to punch the keys on the keyboard than to align the cursor on the screen.
  • Easier on the body. Given the natural placement of keyboard and mouse on any desktop, using the keyboard more often is less stressful on the body. Using the mouse constantly can cause stress on the wrists and shoulders. With the mouse, most users typically end up using just the wrists and index finger, which can cause fatigue and long-term problems.
  • Speed of execution. Keystrokes are much faster than the mouse. To put this to the test, try creating a new worksheet in Excel using the mouse by clicking on File (or the Microsoft button in Excel 2007), then New—Blank Workbook. Alternatively, try the shortcut CTRL + N. There is a distinct improvement in speed with keystrokes over the mouse click.
  • Standard shortcuts. Within the Windows environment, you will find that similar functions have the same shortcuts, so the expertise you develop can be applied to programs other than Excel. The shortcuts in Excel are generally common across all other Office suites and even other applications like browsers, Notepad, Paintbrush, and more.
  • No other choice. There are some functions for which shortcuts are necessary to get the desired results, unless you want to insert manual edits. For example, when creating an array formula in Excel 2016 or earlier, the Control + Shift + Enter shortcut is the only way to get your array formula to insert correctly.

Windows Shortcuts

Table 5.1 is a small selection of some of the most common and particularly useful shortcuts that are invaluable when using Excel for financial modelling. Note that a printable list of these shortcuts is also available at www.plumsolutions.com.au/book.

TABLE 5.1 Useful Windows Keyboard Shortcuts for Financial Modellers

Editing
CTRL+S Save workbook
CTRL+C Copy
CTRL+V Paste
CTRL+X Cut
CTRL+Z Undo
CTRL+Y Redo
CTRL+A Select all
CTRL+R Copies the far left cell across the range
CTRL+D Copies the top cell down the range
CTRL+B Bold
ALT+TAB Switch program
ALT+F4 Close program
CTRL+N New workbook
SHIFT+F11 New worksheet
CTRL+W Close workbook
ALT+E+L Delete a sheet
CTRL+TAB Switch workbooks
Navigating
CTRL+9 Hide row
SHIFT+CTRL+9 Unhide row
SHIFT+Spacebar Highlight row
CTRL+Spacebar Highlight column
CTRL+Minus sign Delete selected cells
Arrow keys Move to new cells
CTRL+Pg Up/Down Switch worksheets
CTRL+Arrow keys Go to end of continuous range and select a cell
SHIFT+Arrow keys Select range
SHIFT+CTRL+Arrow Select continuous range
Home Move to beginning of line
CTRL+Home Move to cell “A1”
SHIFT+ENTER Move to cell above
TAB Move to cell to the right
SHIFT+TAB Move to cell to the left
ALT+Down arrow Display a drop-down list
Formatting
CTRL+1 Format box
ALT+H+0 Increase decimal
ALT+H+9 Decrease decimal
SHIFT+CTRL+B General format
SHIFT+CTRL+! Number format
SHIFT+CTRL+# Date format
SHIFT+CTRL+$ Currency format
SHIFT+CTRL+% Percentage format
In formulas
F2 Edit formula, showing precedent cells
ALT+ENTER Start new line in same cell
SHIFT+Arrow Highlight within cells
F4 Change absolute referencing (“$”)
ESC Cancel a cell entry
= (equal sign) Start a formula
ALT+= Sum selected cells
CTRL+' Copy formula from above cell
F9 Recalculate all workbooks
SHIFT+CTRL+Enter Enter array formula
ALT+M+P Trace immediate precedents
ALT+M+D Trace immediate dependents
ALT+M+A+A Remove tracing arrows
CTRL+[ Highlight precedent cells
CTRL+] Highlight dependent cells
F5+Enter Go back to original cell
SHIFT+CTRL+{ Trace all precedents (indirect)
SHIFT+CTRL+} Trace all dependents (indirect)

Note that if you are using a laptop, you will often need to hold down the Function (Fn) key for the function keys across the top of the keyboard to work correctly. For example, in Table 5.1, where it says to use F2 to edit and show formulas, on many Mac as well as Windows laptops, you'll need to hold down Fn + F2 for this shortcut to work. You can change the settings on your laptop to change this if you prefer your function keys to behave as standard.

Mac Shortcuts

Almost all of the keyboard shortcuts that are available for Windows are available on the Mac version as well. If you are new to Mac, remember that in most cases, Command replaces Control, and Option replaces Alt.

Note that additional shortcuts in Excel for Mac may be created manually through System Preferences.

CELL REFERENCING BEST PRACTICES

Formula consistency is critical for fundamental best practice, both in financial modelling and any other sort of analysis using Excel, for that matter. In order to have consistent formulas across and down the block of data, you need to understand how cell referencing works. Whilst this is a very basic feature of Excel that is taught in introductory Excel courses, it is surprising how many modellers don't understand its importance.

The “$” sign in a cell referencing tells Excel how to treat your references when you copy the cell. If there is a dollar sign in front of a row number or column letter, the row or column does not change when you copy it. Otherwise, it does change.

Relative and Absolute Referencing

Cell references are relative, by default. This means that when you copy the cell, it will change. In Figure 5.6, we have created a calculation in cell B3 which refers to the price in cell B2. When cell B2 is copied down, the reference images will change to images and so on, down the row, which is not accurate.

Excel spreadsheet displaying “$450” in cell B2 and the formula =B2 in cell B3. Cells B4–B7 are enclosed in dashed boxes.

FIGURE 5.6 Relative Cell Referencing

However, if you want the formula to anchor itself to cell B2, you'd need to use absolute referencing. So, if you wanted to calculate the price below of $450 at various numbers of units, you'd need to anchor the cell reference to the price as shown in Figure 5.7.

Excel spreadsheet displaying “$450” in cell B2 and the formula =$B$2*A3 in cell B3. Cells B4–B7 are enclosed in dashed boxes.

FIGURE 5.7 Absolute Cell Referencing

This means that when you copy the formula down, as shown in Figure 5.8, the reference to cell A3 is relative, and changes to A4, A5, or wherever you paste it, but $B$2 remains anchored to cell B2 because it is an absolute reference.

Excel spreadsheet displaying “$450” in cell B2; “$2,250” in cell B3; “$4,500” in cell B4; “$6,750” in cell B5, “$9,000” in cell B6, and “$11,250” in cell B7. Cell B7 is highlighted. The formula =$B$2*A7 is in the formula bar.

FIGURE 5.8 Copied Absolute Cell Referencing

Mixed Referencing

To illustrate further, suppose the following formulas are in cell B3 and you copy them to cell B4. Here are the results in each case:

images copies as: images
images copies as: images
images copies as: images
images copies as: images

The “$” sign anchors a row number or column letter when you copy it. You can anchor both the column and the row (this is absolute referencing), or you can anchor one or the other (called mixed referencing).

In summary:

  • images is relative referencing
  • images or images is mixed referencing
  • images is absolute referencing

Mixed Referencing Exercise

  1. Type the table shown in Figure 5.9 into a blank Excel worksheet. You can create this sheet yourself or a template can be found, along with the accompanying models to the rest of the screenshots in this book, at www.plumsolutions.com.au/book.
    Excel spreadsheet displaying 3 amounts under the Borrowing header in column A and “$18,750” in cell B2. Cells B2 is highlighted. The formula =A2*B1 is indicated. Cells B3–B4, C2–C4, and D2–D4 are enclosed by dashed boxes.

    FIGURE 5.9 Mixed Referencing Exercise

  2. In cell B2, create a formula, using absolute referencing, that can be dragged across and down the entire block to cell D4 in one action (without editing), hence showing the interest payable for different borrowing amounts at different interest rates.
  3. Remember that if you want to anchor the row, the dollar sign goes in front of the row, and to anchor the column, the dollar sign should be in front of the column. Spend a few minutes on this before looking at the answer in the next step, and in Figure 5.10.
    Excel spreadsheet with dashed boxes enclosing cells B2–B4, C2–C4, and D2–D4 with amounts. Cell B2 is highlighted. The formula =$A2*B$1 is indicated in the formula bar.

    FIGURE 5.10 Answer to Mixed Referencing Exercise

  4. Your formula in cell B2 should look like this: images. Copy your formula across and down the block of data so that it looks like Figure 5.10.

NAMED RANGES

Excel allows you to select a single cell or a range of cells, and give it a name. You can then use the name to move to the cells and select them, or include them in a formula.

In the last section in Figure 5.7, we used an absolute reference to anchor our formula to the consistent price of $450.

This cell is called B2, and this won't change; however, we can also change the name of it to something else.

Why Use a Named Range?

Those new to named ranges sometimes struggle to see the benefits of including them in models. It's true that most of the time named ranges are not entirely necessary, but there are some good reasons to use named ranges when building a model:

  • It makes your formulas easier to follow. A formula containing lots of cell references can be confusing to look at and difficult to edit, but if the cell references are replaced by a range name, it becomes much easier to understand. For example, the formula images could be expressed as images.
  • It doesn't need absolute referencing. By default, a named range is an absolute reference, so you don't need to add in any.
  • Drop-down lists with off-sheet sources. You won't be able to create drop-down boxes with dynamic sources unless you use a named range. (See the section “Using Validations to Create a Drop-Down List” in Chapter 7 for a practical example of this.)
  • Linking to external files. It's best practice to use named ranges when linking to external files. This means that when the source file changes, the data linking to it will automatically update.

Finding, Using, Editing, and Deleting Named Ranges    Clicking on the drop-down arrow next to the name will show all the defined names in the workbook (as shown in Figure 5.12). Clicking on the name will take you directly to the cell(s).

Excel window displaying the encircled drop-down arrow next to the name (B3) in the name box. Below the name box is a list of options, namely, businesses, date, lender, QTR, referrer, salesperson, status, and type.

FIGURE 5.12 Finding a Named Range Using the Name Box

Excel will then move to and select the range. It doesn't matter what sheet you are in when you select the name. This can make finding your way around the named ranges in a model much faster.

Having created a range name, you can now use that name in a formula instead of cell references. For example, if you have created the range name called TotalIncome for the cell containing the total income result, and a range named TotalExpenditure for the cell containing the total expenditure result, you can create a formula images (just by typing this text into a cell).

Another example. If you have created the range name Costs for all the cells in a column containing your numerical costs data, you can calculate the total costs using the formula images.

A cell does not need to be an input field in order to assign a name to it, although it often is in financial models. The cell can also contain a formula as well as a hardcoded input value.

Named ranges can be useful, but it's not good practice to have too many. They can be confusing, especially if you have not used a consistent naming methodology. It's also quite easy to accidentally name the same cell twice. So, in order to keep the names neat and tidy, you might need to edit or delete them.

Also, if you have added more data to a spreadsheet, and a range name no longer expresses the correct range of cells, you can redefine the named range.

BASIC EXCEL FUNCTIONS

Now that we understand the basics of formulas and functions in Excel, it is time to start looking at some of the basic Excel functions. With financial modelling—or any other use of Excel for that matter—it is highly unlikely that the entire range of Excel functions will get used. However, the more functions we know, the better equipped we are to translate our business logic into a highly functional, dynamic, and robust financial model.

There are some common basic functions that are used frequently, and understanding them is important for any modeller. Some of the basic mathematical functions included in the Excel suite are: SUM(), MAX(), MIN(), COUNT(), and AVERAGE(). The function names are indicative of the functions they perform.

SUM()

This function is used to sum up a series of numbers. You can add individual cells, by separating them with commas, and you can also specify a range of cells. Figure 5.13 is an example of using a comma in the SUM function.

Excel spreadsheet displaying total admin and total property in cells B8 ($34,100) and B13 ($140,085), respectively, and grand total in the highlighted cell B14 ($174,185). The formula =SUM(B8,B13) is in the formula bar.

FIGURE 5.13 Using the SUM Function

MAX()

This function helps to identify the maximum value. The syntax for this function is very similar to SUM(); you can enter a range of cells, individual cells separated by commas, or a combination of both. This function will return an error if the cells you need to analyse have some text that cannot be converted appropriately. Similarly, if the cells do not contain any numbers, the function returns 0. See Figure 5.14 in which the maximum average monthly temperatures have been calculated for various cities around the world.

Excel spreadsheet displaying the average temperature degrees Celsius in London, New York, Sydney, and Moscow from January to December. Cell N3 is highlighted. The formula =MAX(B3:M3) is indicated in the formula bar.

FIGURE 5.14 Using the MAX Function

MIN()

This function is the inverse of the MAX() function, giving the least value in the list. The MIN() function can also use any combination of ranged series and individual cells. The limitations on inputs and the results are similar to the MAX() function. In Figure 5.15, the MIN() function has been used to calculate the minimum average monthly temperatures.

Excel spreadsheet displaying the average temperature degrees Celsius in London, New York, Sydney, and Moscow from January to December. Cells O3 is highlighted. The formula =MIN(B3:M3) is indicated in the formula bar.

FIGURE 5.15 Using the MIN Function

AVERAGE()

As the name suggests, this function calculates the average, or mean, of the numbers in the list. AVERAGE() is a very useful function in certain situations, as can be seen in Figure 5.16.

Excel spreadsheet displaying the average temperature degrees Celsius in London, New York, Sydney, and Moscow from January to December. Cells P3 is highlighted. The formula =AVERAGE(B3:M3) is indicated in the formula bar.

FIGURE 5.16 Using the AVERAGE Function

Combining Basic Functions

These basic functions can be used individually to calculate the respective results, but they can also be used in combination for various calculations. For example, if you want to find the maximum deviation (or range of values) in the values, you could subtract the maximum and minimum value. So you would have a formula such as images, as shown in Figure 5.17.

Excel spreadsheet displaying a list of items in column A and their corresponding cost in column B. The deviation of $80 is indicated in the highlighted cell B11. The formula =MAX(B2:B8)-MIN(B2:B8) is in the formula bar.

FIGURE 5.17 Combining Functions to Calculate the Deviation

Nesting: Combining Simple Functions to Create Complex Formulas

Excel allows you to include more than one function in a formula. For example, you can add two totals using the formula

equation

but this does not make it a nested formula.

A nested formula is one in which a function is included in the field of another function. This technique allows you to build more complex formulas. Fields appear in parentheses after the function. Some functions require several fields; some require only one. A field can be a number, a reference, or text (usually in inverted commas). If a formula has more than one field, they will be separated by commas.

Some examples follow. This formula has one field range:

equation

This formula has three fields; a reference, text, and another reference:

equation

Finally, we have an example of a nested function, containing another function in a field. This one calculates the average of two totals:

equation

See the section “Nested IF Statement” later in this chapter for more examples on how to build nested formulas.

LOGICAL FUNCTIONS

Logical functions, particularly IF statements, are very commonly used in financial models because they allow the user to turn on and off certain calculations, and to create scenarios and certain conditions or thresholds for calculations to maintain. Because of their common usage in financial models, we'll be focusing on logical functions for the rest of this chapter.

IF Statement

The IF statement takes three fields (Excel calls them arguments, but I'm going to stick with the term “field”):

  • Field 1 = the logical expression that is evaluated
  • Field 2 = the result if Field 1 is true
  • Field 3 = the result if Field 1 is false

The syntax, therefore, looks like this:

equation

The first field consists of a logical expression (i.e., something that, when evaluated, is either TRUE or FALSE). The expression in the first field is evaluated. If it is TRUE, then the IF statement returns the value of the second field. If it is FALSE, then the IF statement returns the value of the third field.

Consider the following example:

equation

The statement being tested is TRUE, so the “greater” value is returned. Try this out, using the Insert Function dialog box, if you're new to IF statements.

Consider another example:

equation

The first expression is false, so the “less than” value is returned.

Practical Example 1    Let's look at a practical example of an IF statement in a financial model. In the valuation model shown in Figure 5.18, we have decided that if the value of the deal is greater than the cost of the deal, then we should accept it, otherwise, we should reject it. The syntax is images, and because the value is greater than the cost, it will return the decision “Accept”. If any of the inputs in this model change, such that the value becomes lower than the cost, then the formula will automatically show “Reject” instead.

Excel spreadsheet displaying diamond construction—leverage buyout (LBO) valuation model ($m) and a Function Arguments dialog box. Cell B29 is highlighted. The formula =IF(B27>B28,"Accept",Reject") is indicated.

FIGURE 5.18 Using an IF Statement for Decision Analysis

Practical Example 2    Here's another practical example of using an IF statement in a financial model, but this time in a consistent block of data. If you had a list of projects as shown in Figure 5.19, and wanted to show these in a spend schedule, you could use the IF function in cell D3 to do this:

equation
Excel spreadsheet displaying a spend schedule for year 2020, 2021, 2022, 2023, 2024, and 2025 and a popped-up function Arguments dialog box. Cell D3 is highlighted. The formula =IF(D$2=$B3, $C3,0) is indicated.

FIGURE 5.19 Using an IF Statement to Create a Spend Schedule

Because mixed referencing has been used, you'll be able to copy the formula in cell D3 all the way across the block of data. You can try this out for yourself by recreating this sheet or a template can be found, along with the accompanying models to the rest of the screenshots in this book, at www.plumsolutions.com.au/book.

NESTING LOGICAL FUNCTIONS

IF statements can also be nested, meaning that it is possible to have an IF statement inside another IF statement. The IF function is normally used to test a cell and perform two different actions, depending on the outcome of the test. But by nesting another IF function inside an IF function, you can test a cell and perform three different actions depending on the outcome of the tests.

For example:

equation

The first field is TRUE so the second field is then evaluated. Because the second field is also true, it returns its second field. Hence, the result for this formula is both.

Test this formula in Excel and enter criteria in the first field such that it returns second and first.

Whilst you'll still see this type of function used in financial models, note that nesting an IF using this method has now been superseded by the IFS function. See the “IFS Function” section in this chapter for further information.

AND Statement

The AND statement tests statements you enter and returns TRUE only if all the logical expressions are TRUE.

For example:

equation

Both of these fields are true, so the result of the formula will be TRUE.

For example:

equation

Only one of these fields is true, so the result of the formula will be FALSE.

The AND statement is most commonly used in conjunction with IF as a nested function. For example:

equation

Only if both of the fields are true will the second field be returned. If one or both is false, then the third will be returned.

The result of this formula is A, because both AND fields are TRUE.

OR Statement

The OR statement is very similar to the AND statement except that either field can be true, rather than both.

For example:

equation

However:

equation

Nested IF Functions

In basic terms, a nested function is a function within a function, and the IF statement is probably most commonly used as a nested function. Prior to the introduction of the IFS function, modellers would often need to nest many IF statements together—in fact, it is possible to actually nest up to 64 functions within a formula model, however, this is not recommended, and certainly not good modelling practice.

Nesting IF and AND Functions    A common nested formula is to nest an IF and an AND function together to test whether or not a certain date or value falls within certain parameters. Let's take a look at a practical example of a useful nested IF formula. You can create this sheet yourself or a template can be found, along with the accompanying models to the rest of the screenshots in this book, at www.plumsolutions.com.au/book.

In the example shown in Figure 5.20, we need to forecast the staff costs over the 10-year period, based on start date and end date. There is no BETWEEN function in existence (yet), but we can calculate this with a nested formula www.plumsolutions.com.au/book

Start by evaluating the start date only, ignoring the end date for now. By following these seven steps, let's build an IF statement that will show the cost only if the date in the schedule is greater than, or equal to, the start date of the employee.

Excel spreadsheet displaying the HoneyCorp business case—staff costs for 2020–2029. The formula =IF(I$6>=$E10,$D10,0) is indicated in cell I10 (F2 shortcut key is used).

FIGURE 5.20 Spot Checking the Block of Data Using the F2 Shortcut Key

  1. In cell G7, add the IF function images and the result will be $136,800.
  2. Add in some cell referencing, so that you'll be able to copy it across and down. Your formula in cell G7 should be images.
  3. Copy it all the way across and down the range G7:P26.
  4. Select a cell and do a spot check by selecting a cell within the block such as cell I10 and using the F2 function key to make sure it's picking up the correct cells, as shown in Figure 5.20.

Now that we've tested and checked this formula and are confident that it's giving the correct results based on the start date, we can go back to cell G7 and add in the end date. We want to test whether the current date (2020) falls between the start date (2020) and the end date (2029), so we can use the AND function to test if 2020 is greater than or equal to 2020 and also less than or equal to 2029:

equation

Of course, we aren't going to hardcode in the dates, so we'll use the cell references instead.

  1. Try out this formula, in a blank cell, and you'll get the result TRUE because both of those statements are indeed true:
    equation
  2. Now we can go back to our original formula in cell G7, and replace the G$6>=$E7 part with the entire AND formula in our existing IF statement to give the nested formula:
    equation
  3. Copy the formula all the way across and down the block of data. Your completed sheet should look like Figure 5.21.
Excel spreadsheet displaying the HoneyCorp business case—staff costs for 2020–2029. The formula =IF(AND(G$6>=$E7,G$6<=$F7),$D7,0) is indicated in cell G7.

FIGURE 5.21 Completed Nested IF and AND Formula

Auditing a Nested Formula    With most functions, we recommend the use of the Insert Function dialog box; however, the Insert Function dialog box does not easily work with nested formulas, and as your formulas get more complex, you need to know the syntax of the formula before attempting to nest it. Because an IF statement is one that is very commonly nested, it is important that you know the IF function syntax.

Nesting Multiple IF Statements    Let's take a look at another example of a useful nested IF formula. You can try this out for yourself by recreating this sheet or a template can be found, along with the accompanying models to the rest of the screenshots in this book, at www.plumsolutions.com.au/book. In the pricing table shown in Figure 5.24, the price varies depending on how many items are purchased.

Excel spreadsheet displaying volume pricing table with column headers labeled Min Vol, Max Vol, and Price.

FIGURE 5.24 Volume Pricing Table

If you bought 63 items, you can see that they would be $10.50 each. If you want to create an automatic calculation for this, you'd need to create a nested formula, starting with the following three steps:

  1. Start with a basic IF statement. If your volume is less than or equal to five, the price is $15; otherwise, it's $12 (for now). So your formula in cell B8 would be images. With me so far?
  2. Once we've got this working, we can make it more complicated. In another cell, say B9, let's do another formula, which will deal with the value if it is greater than five. Create the formula images in cell B9.
  3. Once we've got both of these working, you can add them together. Go into the formula in cell B9; highlight and copy the whole formula except for the equal sign using a Control+C shortcut. See Figure 5.25.
    Excel spreadsheet displaying volume pricing table with column headers labeled Min Vol, Max Vol, and Price. Cell A8, B4, C4, C5 are highlighted. Cell B9 has the formula =IF(A8<=B4,C4,C5).

    FIGURE 5.25 Highlight and Copy IF Statement

  4. Now hit Escape (the copied formula will remain on your clipboard), go back to your formula in cell B8, and replace C4 with the formula you have copied onto the clipboard. Do this by highlighting C4 and pressing Control+V.
  5. Your entire formula in cell B8 should now be: images.
  6. Multiply your price by the volume in cell C8 so we know the total, using the formula images.
  7. Your sheet should look something like the sheet shown in Figure 5.26.
A portion of an Excel spreadsheet displaying a three-column pricing table. Cell B8 is selected with indicated value of $10.50. The formula =IF(A8<=B3,C3,IF(A8<=B4,C4,C5)) is indicated in the formula bar.

FIGURE 5.26 Completed Nested IF Function

So, the following rules will apply for the formula in cell B8:

  • If cell A8 is less than or equal to 5, the price is $15 each.
  • If cell A8 is less than or equal to 50, the price is $12 each.
  • If cell A8 is greater than 50, the price is $10.50 each.

Thus, the formula tests cell A1 to see if it is greater than or equal to five. If it is less than five, the formula will stop there and return the first value if true. If it is greater than five, however, it is then tested again to see if it is greater than or equal to 50. If it is, it will stop there and return the second value if true. If it is greater than five and greater than 50, only then will it return the value if false.

IFS Function    An easier way to complete this would be using an IFS function, which was first introduced in Office 365. Rather than breaking it down into several steps, using the IFS function is a much easier way to achieve this result, as it can be done in one step using the Insert Function dialog box. Unlike the nested IF function, where you need to build a separate IF function for each part of the formula, the IFS function allows you to evaluate each section individually within the dialog box:

  1. Open up the IFS Insert Function dialog box by searching for it in the Formulas tab, or by typing =IFS( and then using the Control+A shortcut.
  2. Evaluate the first part of the statement in the first field. We want to test whether the number of items (63) falls within the first tier, so enter images in the Logical_test1 field. If this is true, we want the formula to return the value $15 in cell C3, so enter C3 in the Value_if_true1.
  3. Follow the same procedure for the second set of fields by entering images in the Logical_test2 field and then C4 in the Value_if_true2.

    In a nested IF statement, we would then just add a “value if else” here, but with the IFS function, you need to give it a third set of criteria to evaluate.

  4. Enter images in the Logical_test3 field and then C5 in the Value_if_true3 and press OK.
  5. The Insert Function dialog box should look like Figure 5.27 and the formula should now be:
    equation
An IFS Insert Function dialog box. A spreadsheet with selected cell B8 is at the background, with the formula =IFS(A8<=B3,C3,A8<=B4,CA,A8<=B5,C5) indicated in the formula bar.

FIGURE 5.27 IFS Insert Function Dialog Box

Note that a nested IF statement or IFS function is an appropriate formula to use in this situation. However, if there were more than three pricing steps in the table, it is recommended that you use a close match VLOOKUP or LOOKUP function instead, as this is a much simpler function than nesting multiple IF statements. (See the section “Building a Tiering Table” in Chapter 9 for how to do this.) Basically, if you find yourself including more than two or three IF statements in a formula, consider whether the formula should be broken into several steps, or whether an alternative, simpler function should be used instead.

SUMMARY

This chapter introduced the more basic tools and functions that are commonly used in financial modelling, such as basic functions, cell referencing, and named ranges. We also covered functions such as IF, SUM, AVERAGE, and nesting these, as well as useful shortcuts that will make your model-building faster and more accurate. The fundamental techniques of using cell referencing for best practice, as well as the use of named ranges, are the critical basic knowledge required for financial modellers before moving on to more advanced tools. The Windows and Mac shortcuts named here will also prove invaluable to increasing your speed, productivity, and accuracy as a financial modeller.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.101.81