Sei sulla pagina 1di 97

Advanced Excel: Top Excel Tips & Formulas to Work Smarter

Advanced Excel: Top Excel Tips & Formulas to


Work Smarter

© 2016 Leila Gharani – XelPlus.com

Leila Gharani, MA
Excel Instructor / Business consultant

Edited by: Michael Diamond

You have permission to share this with anyone you think will benefit.
The catch is: you have to share it for free. You cannot sell this digital
copy or a printed version of it. You cannot change its content nor edit it
in any form. I hope this document will serve you well.

Copyright 2016 Leila Gharani 2


Advanced Excel: Top Excel Tips & Formulas to Work Smarter

Preface
The purpose of this eBook is to help you build a strong foundation in Excel and to solve
complex problems fast. If you’re already advanced in Excel, go through this document
to “fill in the gaps”. I’ve created the following two main sections for you:

1. Top 10 tips to save time


2. Tip 10 formulas to work smarter

I also demonstrate each of the tips and formulas in my online training. If you learn well
by watching, do check out this link: XelPlus.com/AdvancedExcelCourse - A discount
coupon is included there.

If you run into any questions you can ask these on the discussion board inside the
online training platform. Looking forward to “seeing” you there.

What people are saying about the course:

Carlo says: "Excellent course featuring loads of easily understood content. It helped me
become very competent and comfortable with pivot tables along with a host of other
functionality. It's easily understood and also easy to follow. Instructor speaks clearly
and explains things well, very helpful so the information is easily retained."

Steven says: "Well explained, excellent material and topics. Definitely very helpful for my
everyday work."

Boby says: Excellent presentation and easy to understand of an extremely useful


information. I can only say thank you for the new knowledge that I have now gained in this
field, which has been very useful in the improvement of my efficiency in this very highly
competitive working environment. Giving five stars still does not do the justice for the quality
of this course. Please keep up the good work and look forward to see more course
programs from you.

Melani says: Thank you Leila for this very valuable informative training course. I now feel
much more confident in my work.

Copyright 2016 Leila Gharani 3


Advanced Excel: Top Excel Tips & Formulas to Work Smarter

Table of Contents

Advanced Excel: Top Excel Tips & Formulas to Work Smarter .......................................... 2
Introduction ....................................................................................................................... 5
Top 10 Time Saving Tips ................................................................................................... 7
Tip #1: Become Faster with Excel's Keyboard Shortcuts ................................................... 8
Tip #2: Master the Simpler Tasks .................................................................................... 10
Tip #3: Quickly Navigate Larger Files .............................................................................. 19
Tip #4: Inspect Workbooks for Hidden Information .......................................................... 23
Tip #5: Use Protection Appropriately ............................................................................... 27
Tip #6: Import Text, CSV & Data Files Properly ............................................................... 32
Tip #7: Audit & Debug Formulas ...................................................................................... 38
Tip #8: Improve Presentation with Custom Number Formatting ....................................... 40
Tip#9: Solving Problems With Goal Seek ........................................................................ 48
Tip#10: Use Excel PivotTables for Super-Fast Analysis .................................................. 50
Bonus Tip #11: Speed up Excel - Understand Volatile versus Non-Volatile formulas....... 58
Bonus Tip #12: Know the possibilities and the limitations ................................................ 61
Concluding Words ........................................................................................................... 64
Top Excel Formulas Every Analyst Should Know ............................................................ 66
Function #1: SUMIFS & COUNTIFS ................................................................................ 67
Function #2: IF - Nested Functions .................................................................................. 70
Function #3: IFERROR for Credible Reports ................................................................... 72
Function #4: VLOOKUP & HLOOKUP for Dynamic Lookups ........................................... 74
Function #5: INDEX & MATCH for Flexible Lookups ....................................................... 77
Function #6: The Most Useful Text Functions .................................................................. 83
Function #7: Excel's Top Date Functions ......................................................................... 86
Function #8: OFFSET for Dynamic Calculations.............................................................. 89
Function #9: FREQUENCY, SMALL & LARGE................................................................ 91
Function #10: SUMPRODUCT for the Gurus ................................................................... 94
Concluding Words ........................................................................................................... 96
The Advanced Excel Online Course ................................................................................ 97

Copyright 2016 Leila Gharani 4


Introduction

Introduction
Advanced Excel skills are highly relevant in business. No matter which role you’re
currently in or you’re planning to take on. Whether you’ll be in finance, consulting, IT, or
project management, your advanced Excel skills will set you apart from the competition.

The aim of the top 10 list is to increase your awareness of the most useful Excel
features to work faster and smarter. To be able to solve complex problems fast. Only
when you know the extent and possibilities Excel offers you, only then are you able to
handle any type of analysis with the best method.

What is the difference between an Advanced Excel and Average Excel user?

An advanced Excel user is aware of the tools and features available and can apply the
right tools for the right task, instead of relying on their go-to tools and making them work
for every situation. Advanced Excel users, always find the optimal solution for every
task, and they find it fast!

The way I picked this specific top 10 is purely based on my experience of what I’ve
generally seen as “missing” knowledge by many Excel users. It’s difficult to define what
being “Advanced in Excel” really is mainly because it means different things to different
people depending on their interactions with Excel. When you think of it, using one
feature over another doesn’t mean it’s more “advanced”, it just means you have more
alternatives and more options of doing things faster and this puts you one step ahead of
the average Excel user.

Use this document to include missing techniques and formulas in your Excel
vocabulary. We are creatures of habit and it’s difficult to get our head around learning
new techniques. Becoming advanced in Excel takes practice, readiness to learn new
methods and willingness to apply these to practical cases. When you go through each
of these tips and formulas, try to think how you can apply them to your own files.

About Me
I help companies use Excel better to improve their reports with Customized Training
Sessions, Dashboard Training and Enhanced Visualization Techniques. I also help
improve processes, by designing interfaces and tools with VBA for Excel. I am a
Microsoft certified Excel Expert and have over 15 years of experience implementing and
training users on Management Information Systems of different sizes and nature. My
background is: Masters in Economics, Economist, Consultant, Oracle HFM Accounting
Systems Expert & Project Manager. My passion is teaching and solving difficult Excel
problems. I am also addicted to learning and enjoy taking online courses on a variety of
topics.

Copyright 2016 Leila Gharani 5


Introduction

Top 10 Tips to save time


Pick what you like to become more efficient….

Copyright 2016 Leila Gharani 6


Top 10 Time Saving Tips

Top 10 Time Saving Tips


While there are a lot of tools available in Excel, there are a few that are extremely
helpful when you use Excel on a frequent basis. In this Tips section I’ve included topics
that are probably not in a basic Excel training and also if you’ve taught yourself Excel
and worked yourself up to advanced status, you might have missed some of these
important features.

The aim of my Tips section is for you to “fill in the gaps”. Even if you’re using Excel on a
daily basis, you might be unaware of certain features that can prove useful in your daily
work.

Here is an overview of my top 10 tips:

Tip #1: Become Faster with Excel's Keyboard Shortcuts

Tip #2: Master the Simpler Tasks

Tip #3: Quickly Navigate Larger Files

Tip #4: Inspect Workbooks for Hidden Information

Tip #5: Use Protection Appropriately

Tip #6: Import Text, CSV & Data Files Properly

Tip #7: Audit & Debug Formulas

Tip #8: Improve Presentation with Custom Number Formatting

Tip#9: Solving Problems With Goal Seek

Tip#10: Use Excel PivotTables for Super-Fast Analysis

Bonus Tip #11: Speed up Excel

Bonus Tip #12: Know the possibilities and the limitations

As you can see these are not just 10 topics. Some of these include a combination of
topics but overall I wanted to squeeze these points into 10 easy-to-digest main topics.

You might know some of these and some might be new to you. Just remember, the
main challenge is to understand how you can apply the techniques to your own files.
Take whichever tip you find useful and try to immediately use it in on your own data.

Copyright 2016 Leila Gharani 7


Top 10 Time Saving Tips

Tip #1: Become Faster with Excel's Keyboard Shortcuts


Excel contains over 200 keyboard shortcuts.

Keyboard shortcuts are a great way to quickly navigate cells and enter formulas. Excel
allows one of the following three methods to move around the spreadsheet:

1) Keyboard
2) Mouse
3) Keyboard and mouse

The following table lists some of the commonly used shortcuts that save both time and
mouse clicks.

Copyright 2016 Leila Gharani 8


Top 10 Time Saving Tips

TASK Key
Format – cells, text boxes,
CTRL & 1
charts
ALT & Enter
Insert a new line within a cell

Insert row / column CTRL & +


Delete row / column CTRL & -
Move to top or bottom cell of CTRL &
the current column / row Arrow key
CTRL &
Select all cells above or
SHIFT&
below the current cell
Arrow key
CTRL & Page
Move to next / previous sheet
Down / UP
Move between Excel
CTRL & Tab
workbooks
Undo CTRL & Z
Print Preview CTRL & F2

CTRL & F
Find and Replace
CTRL & H
ALT & E then
Paste special
S
Change cell reference
between absolute and F4
relative (edit formula mode)
Save CTRL & S

Insert a table CTRL & T

Show name manager CTRL & F3


F4
Repeat last formatting action

Calculate formulas F9

Time Stamp (click inside cell) CTRL & ;

Copyright 2016 Leila Gharani 9


Top 10 Time Saving Tips

Tip #2: Master the Simpler Tasks


Excel has several commonly useful tools that can make the application easier to use.
It’s important for any Excel user to be familiar with these. Add them to your toolbox and
refer to them whenever the need arises.

Customize Excel
The Quick Access Toolbar (QAT), was introduced in Excel 2007. This can be
customized to include your favourite buttons or commands. Starting in Excel 2010,
customization has also been extended to the main ribbon.

Update Quick Access Toolbar

It’s a good idea to update your QAT to include frequently used buttons and commands.
This way, your QAT becomes your “favourites” toolbar. This saves time since you’ll no
longer need to switch between different ribbons in an effort to try to locate the different
commands.

To update the QAT click on the down arrow and select More Commands…

The QAT should include commonly used commands. Just right-click the selected item
to add or remove it from the toolbar.

Selecting More commands… gives you the ability to add additional features that are
not listed in either the ribbon or the drop down list. Select a new command, and press
Add. Click OK once the command has been added.

Tip: if you are using a third-party add-in you can add those commands to your QAT as
well.

Another advantage for using the QAT, is that each command has a specific keyboard
shortcut. The shortcut order is Alt & 1, Alt & 2, Alt & 3, etc.

Copyright 2016 Leila Gharani 10


Top 10 Time Saving Tips

Use the up and down arrows in the Excel options/customize QAT to allow you to
change their sequential order.

The QAT is available for all your Excel files. If you would like some specific button or
feature to only be available for a specific workbook, click on the dropdown at the top of
the Customize Quick Access Toolbar dropdown and select the currently open
workbook name showing in the dropdown. Here you can add any buttons that you’d like
to be available ONLY for this workbook. When you open this file in the future you’ll see
all the default shortcuts along with the ones you just selected for this workbook. These
file specific shortcuts will only appear when this file is open (active).

Taking the time to update your QAT saves time and increases work efficiency by
organizing your most commonly used commands.

Use Groups to De-clutter


Grouping rows or columns together, makes it easier to organize larger spreadsheets
with lots of data. When rows or columns are grouped using the grouping tool, Excel
collapses everything with the exception of the last row or column in the group. Standard
industry practice is to group cells rather than hide them from view.

Grouping rows or columns this way has the following advantages:

 Visibility: It immediately signals hidden rows or columns that helps avoid errors
 Multiple levels: Grouping allows the user to have multiple hierarchical levels
which aren’t permissible when hiding rows or columns. Nesting groups allow
users to have subtotals within groups and, as a result, allows drilling down to the
underlying data on a granular level. Excel currently supports up to 8 nested
groups

To group rows or columns, highlight the ones you need and click the Group option on
the Data tab in the Outline section of the ribbon.

Copyright 2016 Leila Gharani 11


Top 10 Time Saving Tips

The 1/2/3 tiny buttons on the top left hand side of the file indicate the number of the
sectional grouping levels.

Clicking on button 3 in the example above expands all groupings; clicking button 1
collapses all groupings which provides a summary report; button 2 displays all nested
groups.

Copyright 2016 Leila Gharani 12


Top 10 Time Saving Tips

Know the Paste Special Options


Paste special options provide numerous useful tools that allow manipulating text and
values before pasting.

 Paste as values: Hard codes values by removing all formulas behind them
 Paste comments: Pastes only the comments attached to the cells without
formatting either cells and/or values.
 Paste Skip Blanks: Pastes non-empty cells. Checking this box instructs Excel
to skip over all blank cells while copying and pasting the selected data. If one of
the cells in the original range is empty (blank), but you have a corresponding
value in the range you want to paste over, then this cell will still have the old
value in it. It will not be replaced by the blank cell.
 Paste Transpose: Switches the row/column orientation of the selected cell
data. Checking this box causes Excel to move data from rows to columns and
vice versa.
 Paste formatting: Pastes cell formatting only - cell values (and text) are
ignored.
 Paste link: Pastes linked formulas to the copied cells. Pasted values change as
the original cell values are updated.
 Use operations: Add, subtract, multiply or divide on the selected cells.

Copy the data under the source column, highlight the destination columns and
then select Paste Special followed by the operation of your choice.

Copyright 2016 Leila Gharani 13


Top 10 Time Saving Tips

Select an operation such as Add. Click OK.

The destination cells are updated by adding the numbers of the source column
without the use of any formula.

Add Drop down Lists and Validations


Adding drop down lists to your files - especially for templates which need to be updated
by different users - ensures source data integrity since users are restricted from adding
items that aren’t included in the list. Using data validation reduces typos and mistakes
when working with the file.

To add lists to your cells, first highlight the respective range or cell, and from the data
tab, select Data Validation / Data Validation…

For the more common lists, you have two options. You can either manually type the list
in the validation box or reference the range in the “Source” textbox. To do either of
these you need to first select List from the Allow: drop down box.

Copyright 2016 Leila Gharani 14


Top 10 Time Saving Tips

Under source, type in your values separated by a “,”.

You can also specify an Error Alert if an input is not in line with your allowed values.

To see this in action:

The below error message will appear if a value is entered that isn’t in the selection list:

Copyright 2016 Leila Gharani 15


Top 10 Time Saving Tips

Instead of manually entering the list into the data validation box, the more practical
method is to enter the cell reference to the list range as in the example below.
Whenever source data is updated, the drop-down is updated automatically as well.

Advanced Tricks

 By using the Excel Table feature your validation lists becomes “dynamic” - they
will automatically expand to include any new data that’s added to the table.
Deleted Table data will be removed from the drop down list.

 By adding a conditional formula in the Custom option (instead of using the List
box option) you can cause a secondary list to automatically update when an item
from the primary list is selected.

Remove Duplicates
Duplicate values can be removed in one of two ways:

 Filtering on unique values or


 Removing duplicate values

Filtering on unique values will provide a unique list by hiding all the duplicate values
whereas removing duplicate values deletes all the duplicate rows – leaving only the
unique items.

Copyright 2016 Leila Gharani 16


Top 10 Time Saving Tips

Excel considers rows to be duplicated, if cells in the data range contain identical values
(as in rows 4 & 7, 5 & 8 in the table below)

To filter for unique values:

1. Select (highlight) the range that contains the duplicates to be removed.


2. Go to Data tab. In Sort & Filter click Advanced.

3. From the advanced filter box, select either Filter the list in-place or Copy to
another location.
4. Select Filter the list in-place and check Unique records only.

5. All duplicate cells are now hidden – all that remains visible is one of each item.

To permanently remove duplicate values:

1. Select the duplicate cell range.

Copyright 2016 Leila Gharani 17


Top 10 Time Saving Tips

2. Go to Data tab and in Data Tools, select Remove Duplicates.

3. Press OK from the Remove Duplicate dialogue box and leave the selection as is.

4. Excel automatically alerts you when it has completed this operation by displaying a
message box, which contains both the count of removed duplicate items and a
count of the remaining unique items.

Absolute vs Relative Referencing


A key component for creating reliable spreadsheets includes having a solid
understanding of absolute and relative referencing.

Absolute referencing “anchors” a formula when both of the range operators have the “$”
symbol in front of them (e.g. $R$4). When a reference is absolute, Excel does not
adjust the formula when it’s copied to other cells.

A “semi” relative or semi absolute reference includes a $ sign for either the column or
the row. (e.g. $R4 or R$4). The range letter or number with the $ sign are “anchored”
when moved or copied to another range location. However, the range missing the “$”
sign will adjust accordingly when copied to a new location.

A “full” relative reference occurs when the “$” symbol is omitted from the range
operators entirely. The formula will automatically adjust the co-ordinates based on the
relative reference – i.e. distance of the formula to its dependants.

Removing the “$” symbol from a range operator makes the cell “relative”. Adding a “$”
makes it absolute. You can manually type in the “$” in your formula or use the F4 Key to
toggle between the 4 types of cell referencing:

 Relative: A1
 Absolute: $A$1
 Relative column & absolute row: A$1
 Absolute column & relative row: $A1

Copyright 2016 Leila Gharani 18


Top 10 Time Saving Tips

Tip #3: Quickly Navigate Larger Files


The following discussion demonstrates tips to navigate between large workbooks or
worksheets to simultaneously flip between multiple workbooks.

Build a Table of Contents


Build a table of contents by adding an “index” tab to your workbook and inserting
hyperlinks for each tab in the file. To add a hyperlink to a tab, right-mouse click on a cell
and select Hyperlink. Click on Place in This Document. From the insert Hyperlink
menu box, scroll up to see the tab names. Select the first tab and click OK. Repeat this
for each sheet.

You can create a reusable macro that loops through the workbook which automatically
creates/updates your table of contents. Besides saving time, it’s ideal for larger files .

Use Keyboard Shortcuts


Keyboard shortcuts allow you to navigate between various tabs or different workbooks.

Shortcuts include:

 Ctrl + Page down: to move to the next spreadsheet


 Ctrl + Page up: to move to the previous spreadsheet
 Ctrl + Tab: to move between different workbooks
 Ctrl + Home: to move to cell A1
 Ctrl + End: to move to the last populated cell

Use the Name Box


Typing either a cell address or a given cell name into the name box jumps the cursor
quickly to that cell address. The address can also reference a cell on a different tab. If
you use named ranges, type the named range in the name box and your cursor will
quickly move to that location (even if the named range is located on another
worksheet).

Copyright 2016 Leila Gharani 19


Top 10 Time Saving Tips

To jump to a specific cell or a named range, you can either type directly into the name
box, select from the drop down list located beside name box or press F5 to display the
list of defined names.

The Name box also recognizes R1C1 notation (row and column references). If you type
R200C1 and press enter, for example, your cursor will travel to Column A, row 200
(A200)!

Colour Tabs Accordingly

You can organize your tabs by applying either the drag and drop method or by
assigning them different colours. This allows you to differentiate between them quickly
and easily.

Right-mouse click on a tab, find the desired colour from the Tab Colour menu and
make your selection.

Note: over-colouring is not recommended.

Use the Tab Menu


Working with workbooks with multiple tabs often forces you to scroll to the right to
search for individual sheet names. One way to avoid this is to first right-mouse click on
the little scroll bar arrows at the bottom left hand corner of your workbook. Then, by
right-mouse clicking in the scroll area you can magically bring up the list of all the
workbook tabs. Selecting a sheet in the tab list will move you - in a blink of an eye- to
that sheet.

Copyright 2016 Leila Gharani 20


Top 10 Time Saving Tips

Freeze Panes
When your computer’s screen contains many rows and/or columns of data, freezing
panes facilitates easier sheet navigation. Freezing panes permits you to effortlessly
scroll down and across your worksheet while keeping the specified table rows or
column headers stationary.

Arranging Worksheets
If you need to simultaneously work with different tabs in different workbooks (i.e.
comparing one file to another) Excel allows you to arrange the workbooks horizontally
or vertically, side by side or on top of each other. This effect is accomplished by going
to the View tab and clicking the Arrange All button.

This same technique can be used for comparing sheets side by side in the same
workbook.

Copyright 2016 Leila Gharani 21


Top 10 Time Saving Tips

Select New Window and click Arrange All to organize the workbooks beside or below
each other. Multiple workbooks will now appear on your screen. Excel has created a
“new window”, i.e. duplicated the current file. Any changes made on either tab that you
see on your screen will also be reflected in the “other” or “new” window.

Copyright 2016 Leila Gharani 22


Top 10 Time Saving Tips

Tip #4: Inspect Workbooks for Hidden Information


It’s very common in most businesses to inherit a file that someone else has created.
Quite often these files are rather large and contain many tables. They might also
contain items hidden items (e.g. rows, columns, worksheets, comments, personal
information, etc.). To try to find all these “hidden gems” can be both manual and time
consuming. Starting with 2007, Excel provides a tool to create a quick report
documenting all aspects of your file.

Information that can be hidden and/or personal include:

 Comments: Ink annotations stating the initial or the comment originator.


 Headers and footers: Saved personal information shown upon printing of a
document.
 Hidden rows, columns and worksheets: Sometimes cells are intentionally hidden.
Or, some cells might be carried over from previous owners/users which should be
deleted because the data is outdated.
 Invisible content: Objects, even graphs, can be hidden from view.
 Document properties: Contains details about the workbook (e.g. inactive external
data connections, etc.). Or, personal information (e.g. author name, subject, title,
etc.) and additional custom information.

Sound business practice is to inspect the document before distributing or sharing the
workbook with others. Inspecting the file first can uncover potential problems that users
might unknowingly encounter.

Save a copy of your workbook before using the document inspector tool because you
can’t “undo” the inspector once this data has been removed from the file (there isn’t an
undo operation for this).

Follow these steps to remove any unwanted data:

1. Go to File / Info / Check for Issues and Inspect Document.


2. Excel allows you to choose which items you would like inspected and possibly
removed.

Copyright 2016 Leila Gharani 23


Top 10 Time Saving Tips

3. The document inspector will display a form showing the location of each hidden
item. In this specific workbook, the inspector has found information in the document
properties, a hidden row/column, a hidden worksheet and one invisible content.

4. Press the Remove All button under each relevant section to remove those items.
However, should you be unsure of the content in any of the hidden row(s)/column(s)
you should review the items first, before choosing to remove them.

Copyright 2016 Leila Gharani 24


Top 10 Time Saving Tips

To find out what information is hidden, can be somewhat tricky. Finding hidden
worksheets is easiest. Navigate to the Home tab and select Format / Visibility/ Hide
& Unhide/ Unhide Sheet. A Pop up window will appear providing a list of hidden
worksheets. You have the option there to make them visible by selecting the name.

The Find and Select / Selection Pane option, allows you to locate all hidden objects
on that sheet.

An “eye” icon denotes that an object is visible on the sheet, whereas an empty box
means the object is “hidden” from view.

Copyright 2016 Leila Gharani 25


Top 10 Time Saving Tips

Hidden rows and columns are more difficult to spot without a macro. You can choose to
unhide all columns and rows in a worksheet by selecting all cells (CTRL + A). Then from
the Home tab go to Format / Hide & Unhide / Unhide Rows (or Columns).

This will unhide all hidden rows, but you may not be able to easily spot which ones still
remain hidden. To locate these use the Go to Special option (the CTRL + G shortcut).
Select Visible cells only and click OK.

With this view you will see a white line where the rows or columns have been hidden
thereby giving the location of these hidden rows or columns.

Copyright 2016 Leila Gharani 26


Top 10 Time Saving Tips

Tip #5: Use Protection Appropriately


Use Excel’s Protect Sheet and Protect Workbook features to “tamper proof” your
workbook, worksheets or templates from unintentional changes made by other users.
Excel offers various ways to protect them.

A “protected” workbook should not be confused with a “secure” workbook. Excel


passwords can be cracked using third-party tools.

Fully Protect the Contents of your Workbook


Excel allows you to encrypt your document with a password preventing unauthorized
users from opening & viewing your documents unless they know the current password
to unprotect them.

Go to File / Info / Protect Workbook and select Encrypt Document.

Write a password and save the workbook. Users are allowed to open and view the data
only if they know the current password.

Allow Users to Open as Read-Only


Saving your file as read-only ensures that only users with your “password” can modify
the workbook. Choose the Save As option and press the drop down arrow on the Tools
button next to the Save button to display the General Options menu item.

Copyright 2016 Leila Gharani 27


Top 10 Time Saving Tips

This pops up another dialogue box. Type in a password for modification. Tick mark the
Read-only recommended and click OK.

The next time the workbook is opened, the user is prompted for a password that will
allow them to modify the workbook or open it as read-only to save their own copy.

Leave Specific Ranges Open


Use the Allow Users to Edit Ranges feature to protect a worksheet while still allowing
users to input and modify data in specific ranges. This is useful for templates that
contain calculations or for templates where you’d like to fix the worksheet structure.
Using this option prevents users from adding additional columns or rows or altering your
formulas.

In this example users can input data in C & D.

Copyright 2016 Leila Gharani 28


Top 10 Time Saving Tips

But not in Column E or anywhere else on the worksheet.

Follow these steps:

1. Go to tab review and select Allow Users to Edit Ranges.

2. Click on New.
3. Give the range a specific title if you like.

For the “Refers to cells” section, highlight the range where you want to allow the
users to enter data and click on OK.
4. Select Protect Sheet…

Copyright 2016 Leila Gharani 29


Top 10 Time Saving Tips

5. Provide a password for to enable sheet protection and click OK.

Re-enter the password and confirm.

6. Your sheet is protected, except for the ranges you selected.

Protect Specific Features


When you protect a sheet, you have the option to leave some features “unprotected” so
users can format cells, insert or delete rows or columns, etc.

Go to the Review tab on the main ribbon and select Protect Sheet.

Copyright 2016 Leila Gharani 30


Top 10 Time Saving Tips

By default, the first two items on the “Allow all user of this worksheet to:” are checked
off. “Select locked cells” allows the user to select protected cells but they aren’t allowed
to change the cell’s contents.

Checking more boxes in this list box provides more features in the worksheet for users
to manipulate, change and/or update. Don’t forget to activate sheet protection by
providing a new password.

Copyright 2016 Leila Gharani 31


Top 10 Time Saving Tips

Tip #6: Import Text, CSV & Data Files Properly


Excel has various tools that can clean up your data quickly and easily for further
analysis. Apart from using formulas and formatting, Excel features two useful tools to
manage data clean up - Text to Columns and Get External Data.

Tip: A simple macro can be programmed to import a data file and run a standard
procedure. For example to remap -- based on a mapping table -- or to reformat the data
so it is usable for Dashboard presentations.

Text to Columns
Most Excel users are familiar with Text to Columns but often forget about it. Instead,
they will often spend extra time setting up formulas to split the data instead of using this
built-in tool.

If you have the following situation and you’d like to split the full name into first and last
name in two separate cells, follow the below steps.

1. Highlight the “split’ range and select the Data tab and click Text to Columns.

2. The Text to Column wizard will appear. Click on Delimited since the names often
have different lengths and then Next.

Copyright 2016 Leila Gharani 32


Top 10 Time Saving Tips

3. Select the “space” delimiter in this example. Select another delimiter, if


necessary, or manually type it into the “Other:” box. Click Next.

4. Specifying the correct data format in this step is imperative. If the columns contain
different formats, click each column separately and then choose the appropriate
format type. In this case “Text” is the correct selection.

Copyright 2016 Leila Gharani 33


Top 10 Time Saving Tips

5. You can specify a different destination for splitting the “data”. Click Finish when
you’re ready and your data is split into two separate columns!

Importing External Data


Starting in 2007, Excel contains over a million rows and over sixteen thousand columns.
The Get External Data tool can be used to import and analyse data from other
systems. This tool is also useful for importing data to run your dashboards or do further
analysis using pivot tables, etc.

Usually you can get data extracts from any system (e.g. “.dat” or “.csv” from Oracle,
“.xml” files from SAP, etc.). These can be imported into Excel.

Follow the steps to properly import a data file:

1. Click an empty cell in Excel and select From Text in the Get External Data
section located in the Data tab.

2. This example uses a data file from Oracles Hyperion Financial Management
system. Browse for the text file. Change the setting to “All files” if it isn’t visible on
the browse window (only files with .txt or .csv might be visible here). Select the
file and click Import.

3. The text import wizard appears. Select Delimited and for Start import at row,
enter 2 (or use another number to indicate the row where the imported data is to
begin). You need this if you don’t want to import the header information.

Copyright 2016 Leila Gharani 34


Top 10 Time Saving Tips

4. Check the Semicolon (always look in the preview window to check if your data
looks ok -- including your values). Click Next.

5. Click on Advanced (the third step) and use the “.” and “,” as the correct
separators. Databases often use the “.” as a decimal placeholder. In some
instances (especially European Excel versions) the file can have “,” as the
decimal placeholder.

6. Select Finish and OK or change the destination.

Copyright 2016 Leila Gharani 35


Top 10 Time Saving Tips

7. You will see your data neatly organized in Excel

8. You can easily update this file and/or export it as text or “.dat” file by saving your
worksheet as a “csv” document.

9. You also have the capability to set certain properties for your query.

10. You can force an automatic refresh, for example, every couple of minutes. Or,
you can prompt for a file refresh and specify how new data should be handled.

11. To manually refresh, just click on Refresh All/Refresh in the Connections


group.

Copyright 2016 Leila Gharani 36


Top 10 Time Saving Tips

Use similar steps for xml extracts. Excel has a few features on the Developer tab
which allow you to create connections and/or map xml files to Excel.

Tip: Sometimes data requires the values to be a text string, especially if they have
leading zeros (product ID, Account number, etc.). Excel will always remove leading
zeros if columns aren’t specified as text. To keep this format, select the column and
specify the “Column data format” as text.

Copyright 2016 Leila Gharani 37


Top 10 Time Saving Tips

Tip #7: Audit & Debug Formulas


Most everyday work formulas are often quite complex. The formulas can start out being
simple but by adding Ifs, lookups, etc. you can often end up with a very complex,
“monster” type formula. Then, after all this formula manoeuvring you realize that you
have an error but can’t pinpoint its location. Is the culprit incorrect because of bad cell
referencing and, if so, which cell contains the error?

Formula auditing tools are available in Excel to help you find the errors quickly and
easily. These tools are found on the Formulas tab under Formula Auditing.

Watch Window

The Watch Window is quite useful for large spreadsheets with multiple tabs or
dependent workbooks. The Watch Window allows you to monitor one or more cells as
formulas are modified, without actively going to the cells. For example to “watch” how
cell B240 changes in one of your tabs, just add this cell to the Watch Window. You can
then change formulas, update sheets while continually “watching” the value in this cell
and checking how this changes - without actually going to cell B240.

To add a cell or range of cells to the watch window:

1. Click on Watch Window.

2. Highlight the cells you want to watch and then click on Add Watch.

3. Both the cell value and the formula are visible in the Watch Window.

4. You can now move the watch window to wherever you want. To hide it, click on the
Watch Window button. To show it again, reselect the Watch Window button.

Evaluate Formula
The Evaluate Formula tool is useful to find where formulas have gone askew. It also
provides the intermediate results of nested formulas.

Copyright 2016 Leila Gharani 38


Top 10 Time Saving Tips

For example, suppose you have a complex formula (similar to one below) that sums
columnar criteria contained in rows and some other criteria for columns.

To determine which formula element is correct and which one is not, click on Evaluate
Formula, then Evaluate and use Step-In, where possible, to view the returned value
for the specific arguments.

Here, by tracking what is being highlighted, the Evaluate Formula function makes it
apparent that we have the wrong “last criteria”. The formula can now be corrected.

Copyright 2016 Leila Gharani 39


Top 10 Time Saving Tips

Tip #8: Improve Presentation with Custom Number


Formatting
Custom formatting is ideal for manipulating data in your presentations without actually
“touching” the source data. Using custom formatting helps avoid having to use
intermediary steps that is necessary to change the look of the data.

For example, you might need to present data in “millions”. One option would be to add
an extra calculation step (or cell) by dividing the data values by 1,000,000. Then, in
addition to adding the appropriate currency code to the value, you would add or
concatenate an “M” at the end of the value.

A better alternative is to simply format the cells to show millions. This helps avoid extra
steps and keeps your report lean and your figures as values.

Note: adding text to number formatting doesn’t change the underlying value in the cell.
Excel still recognizes the data as a numeric value and not text.

Changing formatting using the first approach converts the cell values into a text cell
because text added to a value (like “300 M”) converts the value to a text string. Excel
doesn’t perform mathematical operations on text strings.

Formatting the data in column B as millions, is the more efficient and practical
approach. Without looking at the value in the cell itself one would think the cell value to
be “300 M”. Remember, formatting is a façade. Custom formatting changes the visible
appearance of the cell not the actual cell value.

Copyright 2016 Leila Gharani 40


Top 10 Time Saving Tips

Custom formatting is also especially useful when charting your data. Instead of this

You can show this

The second graphic looks neater and more organized.

Copyright 2016 Leila Gharani 41


Top 10 Time Saving Tips

Excel’s main formatting types are:

General: Choosing General allows Excel to “guess2 what is the appropriate formatting.
Using General is usually okay since Excel recognizes date and time entries as Date &
Time and also recognizes text and value entries as either text or values.

Specific (Number, currency, accounting, date, time, percentage, fraction etc.):


These are generally self-explanatory.

Special: Generally used for phone number and zip code entries.

Custom: The Custom option allows you to create your own custom formats. You can
add text to number formatting, choose how you want to display positive & negative
numbers and how you’d like zero values and text entries to be formatted. Proper use of
Custom formatting requires you to follow the proper syntax as described below.

Custom formatting syntax


Customer Number formatting syntax is comprised of the following 4 parts:

Positive number; Negative number; Zero; Text


Each segment is separated by the “;” symbol. Excel doesn’t require all 4 parts though.
If your formatting includes only two parts, Excel assumes the first part of the formatting
to be for positive values and zeros while the second part will be used to format negative
values. If you specify only one format segment, - i.e. the semi colon is entirely left out
from the syntax - then Excel ignores positive & negative but applies the same formatting
to all four parts. Text values are displayed as typed, so no special formatting is applied
to them. You can build custom formats from scratch rather easily but it’s good business
practice to use an existing custom format and adjust it to get the result you want.

Follow these steps to create a custom format:

1. Select the Cell/Column/Row to be formatted.


2. Right-mouse click / format cells or use shortcut “CTRL” + 1.
3. Click on Custom for category and under “Type” write the custom format string.

Copyright 2016 Leila Gharani 42


Top 10 Time Saving Tips

4. Press Ok and verify that the format is correct.

Here is an example of an existing custom format.

And another that also controls zero values and text behaviour.

I’ll break these up and explain them in a bit. Before that, let’s have a look at the rules:

Character Description
$ or € Special character that will show without need for quotation
marks
+ , - , = , < , > , /, ( , ) These appear in the cell depending on where you have
typed it. No need for quotation marks
“” Displays text that is typed between the quotation marks
_( , _) The _ displays a single blank character space
0 Placeholder for values. No decimal places.
# Digit placeholder as in 0. Difference is that it does not force
trailing 0 values. i.e. if you have #.## as format then 1.2 is
displayed and not 1.20
. Dot to display decimal digits
, Comma displays the thousand separator
#,##0 Displays commas for every three digits
#,##0.00 Display commas for thousands and shows two decimal
places
0, and 0,, If a comma follows a place-holder then numbers are

Copyright 2016 Leila Gharani 43


Top 10 Time Saving Tips

displayed in thousands and if two commas follow then they


are displayed in millions
? Digit placeholder follows the same rule as 0. One difference
is that it shows blank for zero values and also aligns the
decimal places of the numbers in columns
* The asterisk tells Excel to repeat the next character until the
width of the cell is filled so for example if you want the dollar
sign on the left hand side of the cell and then have blank
space and the number on the right hand side inside the cell
you have to follow the * with a blank space. For example:
$* #,##0 (the yellow part emphasises the blank space)
[Black], [Green], [Red], To change the colour of your values, type the colour code
[White], [Yellow], as the first item of each section. If you’re not happy with the
[Magenta], [Cyan], [Blue] hue or you’d like another colour you can select a colour
code for more colours from the palette. The syntax for using
the colour index is for example [Color10] which is a darker
green than the [Green] colour
see http://msdn.microsoft.com/en-
us/library/cc296089(v=office.12).aspx
@ Placeholder for text

Below are some examples demonstrating how to use these symbols:

Example 1: displaying data in millions

The following format is used to display data in millions:

“0,” says to Excel “display this number in millions”. “,” represents thousands and “,”
denotes millions. The second “M” adds text to the formatted number but the underlying
cell value stays the same. The first part after the first “;” is identical with the positive
number format but displays negative values using the negative sign. The “-“ after the
second “;” replaces zeros with “-“. Text formatting in this example has been ignored -
only +ve, -ve and zero values have been modified.

Example 2

“#,##0-);” formats the number in thousands with a space added to ensure that there is a
space between the number and the cell border. “[Red] (###0)” uses red font for
negative numbers and places parenthesises around the number. Zeros are shown as
typed while text formatting, again, is ignored.

Example 3

Copyright 2016 Leila Gharani 44


Top 10 Time Saving Tips

“_($*#,##0_) ;”includes a space before and after the number, so values are not “stuck”
to the borders. Excel recognizes the dollar sign symbol. There isn’t a need to place it in
brackets. “*“ part adds a space depending upon the length of the cell. For example, if

the cell is small then this result is this and if it’s wider the result will be

. “($*(#,##0_));” is similar but with brackets for negative numbers.


For zeros the “($* “-”_));” places a “-“ instead of a zero. For text the “_(@_)” part adds a
space before and after the text – again to ensure that text is not “stuck” to the cell
borders.

Example 4

“?” will right-align decimal places or value fractions with each other. If you have this

and use “?” the result will be with all decimals right-aligned.

Here are some more formatting examples and their results:

Format Result positive Result negative Result zero

#,##0," k";-#,##0," k";0


0.00%_);[Red](0.00%);-;
[Color10]€* #,##0;[Red](€*
#,##0);-;@
0.00;"Error"
000000

Conditional formatting using the custom format option


Colours are designated using “[ ]”, but they can also be used to perform conditional
formatting operations. It has more limitations than Excel’s conditional formatting tool but
it can be utilized to create a “high”, “low” and “other” case scenario.

For example

Copyright 2016 Leila Gharani 45


Top 10 Time Saving Tips

Before formatting:

After formatting

The first condition, “[>100]”, sets the upper boundary - if the value is greater than 100
then place “A Group” with a space followed with the value. The second condition, C
Group “[<50]”, sets the lower boundary. Finally, the “B Group”, is for everything between
these boundaries.

This feature can be useful for simple formatting features but for more flexibility and
functionality, use conditional formatting.

Testing your number formats


You can sometimes spend a lot of time trying to get a custom format “just right”. You
find yourself flipping between the spreadsheet and custom formatting to get it to work
properly. A workaround is to test the desired custom format formula with the TEXT()
function. You first create the workable formula format on your spreadsheet (see below)
and then copy the formula format into the custom formatting “Type” field.

Note - The font colours (“[Red”] & “[Green]” for example) can’t be tested using the
TEXT() function – this syntax only works within custom formatting. The fonts will only
change colour when the formula has been copied and pasted into the custom formatting
“Type” box.

Copyright 2016 Leila Gharani 46


Top 10 Time Saving Tips

And the result is

Copyright 2016 Leila Gharani 47


Top 10 Time Saving Tips

Tip#9: Solving Problems With Goal Seek


Goal Seek is located on the data tools tab as part of the What-if-Analysis section.

The following are different ways to describe goal seeks uses:

1. It’s when you know the end result but don’t know what the input should be to get
to your result.
2. It automates the trial and error process. It’s like guessing on speed. It’s useful for
situations where you want quick answers.
3. Using Goal Seek instead of a formula can be faster to set up.
4. With Goal seek you don’t have to change your formulas or turn a formula field to
an input field.

Let’s go through a simple example. Your current turnover is as follows:

You would like to know how many units you need to sell to reach a turnover goal of 350.
Use Goal Seek to avoid guessing the Units sold field.

1. From Data / What-If-Analysis / Select Goal Seek.

2. For Set cell select B3 – which actually contains a formula. Field To value: should
be 350, and By changing cell: should be B1 – i.e. the variable that answers your
question.

3. That’s all! Goal seek finds the closest answer for you. It does this, without
overwriting or altering any of your formulas. You can then round up or round down
your result to get full units sold.

Copyright 2016 Leila Gharani 48


Top 10 Time Saving Tips

This was a simple version of goal seek. You can also use more complex formulas and
indirect relationships. The variable you want answered doesn’t have to directly flow into
the results formula. It can be indirectly a part of it, meaning it can flow into other
formulas that in return impact the final formula.

Take a look at this example: Units sold is used to calculate turnover which is used to
calculate annualized turnover which is then used to calculate working capital %. You
can quickly find out what your units sold should be if you’d like a working capital of 10%
instead of the current 12%. Goal Seek can be much faster than guessing.

Goal seek is a great feature to keep in mind when answering this sort of what-if
questions. Keep in mind you can only change one variable to influence your outcome.
To be able to change multiple variables with more complex constraints, you can use
Solver. Solver is a part of the Data tab, but first needs to be activated in the Excel
options / Add-Ins section.

Copyright 2016 Leila Gharani 49


Top 10 Time Saving Tips

Tip#10: Use Excel PivotTables for Super-Fast Analysis


PivotTables are a great tool to quickly report and summarize your data. The best thing
about PivotTables is they allow you to sort, group and analyse your data without the
need to write formulas. You can also link to sources outside Excel. Pivot Charts provide
you with a quick and dynamic visualization of your data.

There is so much to PivotTables that can’t be covered in a few pages. In this document,
I would like to take you through the guidelines of creating a PivotTable as well as its
most common features. This will provide you with enough information to be able to dig
deeper on your own data and expand your knowledge in this regard.

Here is a checklist to go through before you create your Pivot:

 Each column has a header


 There are no blank columns in between
 No summations are embedded in your data table

This ensures that your raw data table is in a data list format.

An efficient method is to turn your raw data table into an Excel table. Why? Because the
moment you add new data to your raw data table, the numbers will be reflected in your
Pivot (upon refresh). You don’t need to update the data source range, which you would
otherwise have to do. Turning your data into a table, also means that each column will
have a header so you will have no errors when you insert a Pivot.

Here are the steps to create a Pivot Table:

1. Click anywhere in your data table. From the Insert tab, select PivotTable.
2. Check your table/range and decide if you want your pivot on a new worksheet or
the existing worksheet.

3. The next step is to design your report. You can do this by dragging and dropping
each field into the different sections of the report. Here is a guideline for each
section:
Report Filter: Enables you to page through the data summaries
Column Labels: Field labels in the columns
Row Labels: Field labels in the Rows

Copyright 2016 Leila Gharani 50


Top 10 Time Saving Tips

Values: This is your data field, the heart of your report. You have different
presentation options. For example, you can choose whether the data should be
summed, or counted.

4. You can make design improvements to your report. Select from a set of design
layouts or create your own. If you have a certain format you’d always like to use,
right-click on the design option and set it as your default.

5. From the Options tab, you have the following features:

Copyright 2016 Leila Gharani 51


Top 10 Time Saving Tips

You can get to most of these options by right-mouse clicking on your pivot field.

Useful Tips When Working with PivotTables

 To drill down on a particular value, you just need to double-click. Excel creates
a new sheet including detailed line items.
 Change the summary formulas by right-mouse clicking on your pivot and select
“summarize data by” option.
 Refresh your pivot when data is changed.
 View your data in a chart by clicking on PivotChart.
 Get the report field identical to the pivot field name by putting a space after the
name as shown below.

Copyright 2016 Leila Gharani 52


Top 10 Time Saving Tips

 Use the Slicer option (Available from Excel 2010 onward) to get buttons to filter
the categories. This gives your report a more dynamic, dashboard look.

 To create a calculated field for your Pivot analysis such as the % difference
between budget versus actuals, follow the steps below.

 Use the GetPivotData function for more complex calculations based on the data
from your PivotTable. GetPivotData appears by default once you reference a cell
in the PivotTable. If it doesn’t, make sure you have the Use GetPivotData
functions for PivotTable references check marked in your Excel options.

Copyright 2016 Leila Gharani 53


Top 10 Time Saving Tips

The reason the GetPivotData function is better than simply referencing the cells
in the PivotTable using normal formulas, is that even if the location of the data in
the PivotTable is changed, the values returned remain the same. This means,
even if your references shift down some cells and the layout of the PivotTable
changes, the GetPivotData references will remain unchanged. The one catch is
that the fields you are referencing must be visible in the PivotTable.

 You can also use Groups to better organize your data. Excel offers smart
grouping options for dates.

Copyright 2016 Leila Gharani 54


Top 10 Time Saving Tips

 You can also apply conditional formatting to your PivotTable to make your data
more readable.

 You can easily create a PivotChart out of a PivotTable. Select PivotChart


followed by the chart type. Note that not all chart types will be compatible with a
PivotTable. If you are creating more complex charts, it will be likely that you will
need a separate “data preparation table” for the chart which will use
GetPivotData functions. If you are designing a more simple chart, use the
standard PivotChart options.

Copyright 2016 Leila Gharani 55


Top 10 Time Saving Tips

You can also make your PivotChart titles dynamic by following the below steps:

 You can also use PivotTables to get unique values from a list. Simply insert a
PivotTable based on the data and bring the field/s you’d like unique values for,
to the Row Labels section. Copy and paste it where you like.

Copyright 2016 Leila Gharani 56


Top 10 Time Saving Tips

As you can see, Pivot tables are a great tool for quick analysis. They can also be
used as a data feeding tool for your dynamic dashboards.

Copyright 2016 Leila Gharani 57


Top 10 Time Saving Tips

Bonus Tip #11: Speed up Excel - Understand Volatile


versus Non-Volatile formulas
The larger worksheet size that came with Excel 2007, allowed users to create and
manage larger, more complex spreadsheets than in previous Excel versions. It also
came with improvements in terms of speed. However, many Excel users still struggle
with slow spreadsheets. Watching the processor’s progress can be quite frustrating!

By using some straightforward techniques and having a better understanding on how


Excel works with functions, can significantly improve any slow-calculating workbook.

The design of your Excel spreadsheet is key in defining how efficient and fast your
workbook calculations run. Often times spreadsheets run slow, not because of the
number of formulas used or the workbook size, but due to the number of cell references
in your formulas and the efficiency of the functions used. It is also important to
understand how Excel runs calculations and which cells are calculated. Knowing the
difference between volatile and non-volatile functions can also help you define which
formulas to use if your files slow down.

Make sure your work is optimized:

 Delete all invalid links, names or formulas


 Keep as much information as possible on the same workbook
 Delete everything that is “out of date”. Press Ctrl + END to determine the actual
used range on each one of your sheets. Remove rows or columns that aren’t
needed and remove all empty cells in the used range. Save the workbook.

Make sure your formulas are optimized to:

 Use the most efficient function possible to get your results. It’s extremely
important to thoroughly understand Excel’s more advanced formulas and from
this understanding you can judge which formulas work best for a given situation.
Knowledge like this reduces workarounds and complex calculations. Expand
your Excel Vocabulary. For example use the IFERROR() formula instead of the
IF(ISERROR(),,)

 Minimize the number of cells in a function. For example, if you are using
VLOOKUP or SUMIF do not reference the entire column (D:D) but (D1:D200).

Be careful with Volatile functions

Volatile functions are formulas that automatically get recalculated any time data is
entered into an open workbook. They get calculated independent of whether your
formula is using these cells or not; calculations occur in any cell regardless of the
formula. Cells are also recalculated when a new row or column is inserted; a worksheet
is renamed or the worksheets tab order changes. Any task performed in any open file
causes these volatile formulas to recalculate. Examples of volatile functions are

Copyright 2016 Leila Gharani 58


Top 10 Time Saving Tips

 =OFFSET()
 =TODAY()
 =NOW()
 =INDIRECT()
 =RAND() & RANDBETWEEN()
 =CELL ()
 = INFO()

Chances are, if you’re an intermediate Excel user, you’ve used some of these.

Conditional formatting formulas are also volatile. Conditional formats are evaluated
every time data change. Since conditional formatting is comprised of both formatting
and calculations both of these can decrease calculation time twofold. Note that
conditional formats are only updated based on what is visible on the screen, everything
else is not. Extensive use of highly complex conditional formatting formulas can cause
scrolling up and down to be slower as well.

Using volatile functions may not necessarily be the reason for a slow workbook. The file
“might” just slow down because you have a large and rather complex workbook. If your
workbook is quite slow and volatile functions are being used, then it would be wise to
look for alternative calculation methods. Sometimes you can replace volatile functions
with non-volatile ones - substituting OFFSET with the INDEX and MATCH function for
example. VBA (Visual Basic for Applications) is also an option for complicated
workbooks and calculations.

How do normal formulas work?

Non-volatile formulas recalculate any time a cell is changed that impacts the formula.
Conversely, if the updated cells impact these formulas then nothing gets recalculated.
Let’s assume you have a large Excel file that has thousands of formulas and many of
these formulas reference other cells which might in themselves also be formulas
referencing other cells. This dependency chain is memorized and stored by Excel in a
dependency tree. Excel uses this dependency tree to decide which cells to recalculate
and which cells to ignore. For normal formula calculation, Excel always refers to this
dependency chain. If you make one change to a cell, it updates its dependency tree.

Follow the steps below to speed up any of your slow-calculating workbooks.

Copyright 2016 Leila Gharani 59


Top 10 Time Saving Tips

Copyright 2016 Leila Gharani 60


Top 10 Time Saving Tips

Bonus Tip #12: Know the possibilities and the limitations


Just like with any program, the user should know both Excel’s potential and limitations.
Companies may need and use more complicated systems to handle databases and
consolidations but they still rely heavily on Excel as a data reporting and analysis tool.

The below illustration shows my view on BI systems and Excel. The optimal solution is
to use the best of both worlds. Use Excel where it’s good at – flexible reports, graphics
& analysis – and use BI where it’s good at – handling large amount of data & users with
a strong security concept.

The following examples demonstrate some uses of Excel. Below is a KPI dashboard
created by retrieving data from Oracle’s Hyperion Financial system. The dashboard is
dynamic and works flawlessly with formulas. The form controls, such as the drop-down
boxes, selection and option boxes, allow the users to switch between different views.
The scroll bar on the right enables all companies to be viewed in the same window.
Graphs are animated and dynamic so that the user can tick mark “budget” and/or
“Previous year” for direct comparisons.

No macros or VBA programming are necessary.

Copyright 2016 Leila Gharani 61


Top 10 Time Saving Tips

OFFSET technique is
used to enable users
to scroll to many
more companies

The second dashboard below shows the geographical sales revenue distribution of the
selected company. A scatter chart is deftly used to dynamically visualize the company’s
annual sales. A combined graph is also used to compare the current year values to
those from the previous year.

The next example is an Excel Template that can be used for project management
purposes. It’s fully dynamic; it uses formulas, graphs and conditional formatting to
dynamically illustrate the project completion percentage and the current week.

Copyright 2016 Leila Gharani 62


Top 10 Time Saving Tips

VBA can be used as well to create real standalone programs and tools that enable you
do certain tasks. Learning some Visual Basic is a critical skill for any Excel power user.

With VBA, you can create sophisticated dashboards. You can create tools that map
data from one database to another, you can also control other applications from Excel.
PowerPivot is available from Excel 2010 onwards and takes the application to a whole
new level.

Copyright 2016 Leila Gharani 63


Top 10 Time Saving Tips

Concluding Words
Let’s take a look at what we covered:

1. Become Faster with Excel's Keyboard Shortcuts


2. Master the Simpler Tasks
3. Quickly Navigate Larger Files
4. Inspect Workbooks for Hidden Information
5. Use Protection Appropriately
6. Import Text, CSV & Data Files Properly
7. Audit & Debug Formulas
8. Improve Presentation with Custom Number Formatting
9. Solving Problems With Goal Seek
10. Use Excel PivotTables for Super-Fast Analysis
11. Speed up Excel
12. Know the possibilities and the limitations

To master these methods you have to apply them to practical problems. This forces you
to mix and use the knowledge you learn in creative ways to help improve your own
spreadsheets. Pick at least one of the tips and apply this to your own files.

Copyright 2016 Leila Gharani 64


Top 10 Formulas every analyst
should know….
and not necessarily by heart – but know of its existence and
capabilities…
Top Excel Formulas Every Analyst Should Know

Top Excel Formulas Every Analyst


Should Know
Excel offers an incredible number of functions that permit dynamic analysis of data. In
this document, I will introduce you to the top 10 Excel functions I believe every user who
deals with Excel on a frequent basis should know. It’s only when you are aware of what
Excel can do in terms of dynamic formulas, will you be able to create solid spreadsheets
and be fast and confident in your analysis.

A friend of mine, who works in the IT department and uses Excel daily, came to me with
the following question. He wanted to find which day of the week most users utilize their
system. He had imported a data file into Excel that contained the username of the
person logging in and other relevant information. It had a lot of dates, a lot of users,
going back many months. He needed to find the day of the week from the date field and
create some dynamic Pivot Charts to visualize the utilization. For example to check how
Monday looks in comparison with Tuesday and whether there is a specific week day
that has the least users logging in. The way he had gone about this was to crosscheck
the dates with his calendar and assign the week day manually in the file in a separate
column. What surprised me was he didn’t ask Google if Excel had a function he could
use. He didn’t think Excel was capable.

This is the reason for my top 10 formulas. You don’t necessarily have to know these by
heart but it’s important that you understand their usage and are aware of their existence
so you can use them whenever the situation arises.

Function #1: SUMIFS & COUNTIFS

Function #2: IF - Nested Functions

Function #3: IFERROR for Credible Reports

Function #4: VLOOKUP & HLOOKUP for Dynamic Lookups

Function #5: INDEX & MATCH for Flexible Lookups

Function #6: The Most Useful Text Functions

Function #7: Excel's Top Date Functions

Function #8: OFFSET for Dynamic Calculations

Function #9: FREQUENCY, SMALL & LARGE

Function #10: SUMPRODUCT for the Gurus

Now let’s have a look at them in more detail.

Copyright 2016 Leila Gharani 66


Top Excel Formulas Every Analyst Should Know

Function #1: SUMIFS & COUNTIFS


Do you know the difference between the SUMIF and SUMIFS function?

The SUMIF allows only one condition to be evaluated, whereas the SUMIFS
(introduced in Excel 2007) allows up to 29 criteria to be evaluated. It’s the plural version
of the SUMIF function.

First, let us cover the SUMIF function. It sums the data in a column or row based on a
condition. In the example below, SUMIF adds the values in Column B, if Column A
equals Company A.

The syntax of the SUMIF function is comprised of the 3 following arguments:

 1) the criteria range – in this case A2:A8


 2) the criteria itself – in this case Company A
 3) the sum range – in this case column B2:B8

What if you have multiple conditions? How do you get the total sales for Product A, sold
by Company A? This is where the SUMIFS function comes in.

The syntax of SUMIFS is different to the SUMIF function. SUMIFS was introduced in
Excel 2007. Notice for the SUMIF function, the sum range is at the end. It’s not possible
to put the sum range at the end for the SUMIFS because the number of criteria to be
evaluated can vary. This means the position of the sum range in the formula can vary.
For this reason, the sum range was switched to the first argument in the function. The
original SUMIF formula couldn’t be revised using this new format because it would
cease to be compatible with older Excel versions.

The syntax of the SUMIFS function is

 First is the sum range

Copyright 2016 Leila Gharani 67


Top Excel Formulas Every Analyst Should Know

 Next the criteria range of your first criteria


 Followed by the criteria itself
 Add more criteria ranges followed by the criteria as necessary

The below example shows the formula that finds the total sales of Company A for
Product A.

Notice cell references have been made for the company and product.

You can include in the criteria argument

 wildcards in the form of *


 mathematical operators such as >, <, =, or a combination of these

You need to surround the mathematical operators in quotation marks. If you wanted
total sales for Company A and Product A, where sales are greater than 425, you would
need to add additional criteria. The criteria range is the sales value which is also your
sum value. The “>425” can be written in different forms. It can also be written as
“>”&425 or “>”&C7. C7 is the cell reference for the value 425 .

Copyright 2016 Leila Gharani 68


Top Excel Formulas Every Analyst Should Know

The same logic applies to the AVERAGEIFS function, which as opposed to the sum
function calculates the average value of the range based on given criteria.

COUNTIFS function is shorter because it doesn’t need the additional sum range. It only
needs the criteria range. It counts the number of times the criteria are met.

As you can see, the IFS version allows you to easily add exceptions to your sum,
average and count calculations. Don’t make your life more difficult by trying to use Excel
filters to get your sum, use the IFS formula instead.

Copyright 2016 Leila Gharani 69


Top Excel Formulas Every Analyst Should Know

Function #2: IF - Nested Functions


Nesting is defined as “using formulas inside other formulas”. The are many reasons to
nest formulas but the biggest reason is that data analysis (or manipulation) isn’t a
simple and straight forward task. In many situations, you may need to make exceptions
or change one or more outcomes based upon a situation. In the example below, nested
formulas are “housed” inside the IF statement.

Start with IF (what should happen if true, else what should


happen if false). In the false statement, you can open with
another IF.
One gigantic IF formula can contain a myriad of IF statements.

Imagine you have the below data set:

You’d like to do the following analysis:

Your list contains entities in column I. You’d like to grab the corresponding sales values
in column J. However, you need to make an exception because if the entity in column I
is West_02 then the value would be “Not applicable” instead of the sales value.

This is an example of a simple nest. The formula above translates to:

If West_02 isn’t selected lookup the corresponding sales value. Otherwise, if West_02
is selected then enter “Not applicable” in that cell.

Copyright 2016 Leila Gharani 70


Top Excel Formulas Every Analyst Should Know

Maybe you decide to incorporate a second exception to the rule. Perhaps you need to
make an exception for West_04 in such a way that the formula would return the values
in the “Special Sales” column (C) instead of the values in the “Sales” Column.

What happens to the formula when a second nest is added and you move the order of
your first nest? Your formula in this scenario would read:

If the selected Entity is equal to West_04, then lookup the corresponding special sales;
otherwise, if Entity is equal to West_02 return “Not applicable”; and if neither of these
are true then lookup the corresponding sales value from column B.

Nested formulas, as you’ve probably observed, can be difficult to read.

In all these “hard to read” situations use the Evaluate Formula tool in Formulas, Formula
Auditing to follow the intermediate results of the nested formula.

The Evaluate Formula feature displays the result for both True or False in the IF
statement. Each answer is displayed separately as shown in the above graphic. It’s a
great tool for formula debugging - especially for deeply nested formulas.

Copyright 2016 Leila Gharani 71


Top Excel Formulas Every Analyst Should Know

Function #3: IFERROR for Credible Reports


If you create, run, or alter Excel reports often enough you’ll eventually encounter
formula errors (such as either global or cell specific errors). Understanding the types of
errors that “pop up” and why they occur is essential, so you know how to properly
correct them.

The below table provides an overview of the error types and their description.

Error Description
This is probably the most common error and easiest to pinpoint.
#DIV/0!
When you divide a number by zero you will get this error.
This error is returned when the wrong type of argument is used.
#VALUE! For example, if you try to multiply a value by a cell that has text in
it.
This error results when you move your formulas and haven’t
correctly specified which cells are fixed and which should move
#REF!
with your formula. Also if you delete some cells that were a part
of your formula.
The most common reason for this error is because the formula
#NAME? has been mistyped and Excel doesn’t recognize what function
you are referring to.
This is a frequent error if you are using Lookup formulas
#N/A!
(especially in VLOOKUP) and the matching cannot be done.
This is an uncommon error and occurs if you haven’t specified
#NULL! your ranges correctly, e.g. typing SUM(B4 B6) instead of
SUM(B4:B6) or SUM(B4,B6).
This is another uncommon error and occurs when you supply an
#NUM! invalid number to your formula e.g. if you are using negatives
where a positive number is required by your function.

The “=ISERROR()” function, returns TRUE if any of the above errors occur in the
formula. If you use the “If(ISERROR(), , ,)” combination then you have the capability to
instruct Excel to return that exact message (value) that you want shown if one of these
errors are encountered. For example

IFERROR was introduced in Excel 2007 to replace ISERROR. It is shorter, easier to


write, and provides an elegant and simple way to hide errors.

The main difference between them is that the ISERROR function evaluates the formula
twice. IFERROR, on the other hand, evaluates it only once making it easier to read,
write and process.

Copyright 2016 Leila Gharani 72


Top Excel Formulas Every Analyst Should Know

Below, in column F, you see an example of an error free VLOOKUP function (we cover
this formula next). Beside it, in column G, there is an incorrect VLOOKUP which creates
an error. The formulas below hide this error – one approach incorporates
IF(ISERROR()) and the second approach IFERROR. You can see how much leaner the
IFERROR version is.

Remember, IFERROR and If(ISERROR() both apply to all types of errors regardless of
their type. IFERROR is the more simple and elegant alternative.

Copyright 2016 Leila Gharani 73


Top Excel Formulas Every Analyst Should Know

Function #4: VLOOKUP & HLOOKUP for Dynamic Lookups


I believe the majority of the Excel user population is familiar with the VLOOKUP and
HLOOKUP functions. Just to be sure, I had to include these in here. These two
functions are easy to write and understand and they are a major time-saver for simpler
lookups.

The VLOOKUP function can search for a specific category or value in a table and return
the “opposing” value from adjacent columns. HLOOKUP works exactly in the same way
except that it looks horizontally rather than vertically. “V” in VLOOKUP refers to vertical
and “H” in HLOOKUP refers to horizontal. If the data in your table has column headers,
use the VLOOKUP function. If the data table has row headers and you need to search
horizontally across the rows for a “match” then use HLOOKUP.

The main limitation is that the value looked with VLOOKUP needs to be in the left-most
table column and in HLOOKUP it has to be in the top row of the data set.

Below is an example of the less commonly used HLOOKUP function.

HLOOKUP is used to search along the top row and then look down to retrieve the result
from a specified row – the second row in this instance.

The example below uses the VLOOKUP function.

Copyright 2016 Leila Gharani 74


Top Excel Formulas Every Analyst Should Know

The VLOOKUP formula syntax is the following

 Lookup_value: A11 or East_01 (in this example).


 Table_array: the range includes the location of the column lookup value and the
columns where the return value is located (i.e. A1:B9).
 Col_index_num: the number of columns it should move to the right. In this case,
the range contains two columns with the match found in the second column.
 Range_lookup: this argument is important to use correctly if the lookup value is
text and non-numeric. If the parameter is left empty, it defaults to “TRUE”
meaning that an exact match is unnecessary. But, to work properly, the lookup
column must be sorted in ascending order. Otherwise, an error or #NA will
appear in the cell if the column isn’t sorted in ascending order and this argument
is left empty.

In the example above, if FALSE is excluded from the last argument then the formula will
return an #NA error, because the lookup column is not sorted in ascending order. (Text
shouldn’t include trailing spaces). Use the trim function to “clean up” your text to avoid
this from occurring.

Building up on the VLOOKUP Function

Wild Cards: Various wild cards can be used with VLOOKUP. You have the option to
use the asterisk (*) to match any sequence of characters or the question mark (?) to
match any single character. Note that if you want to find an actual question mark or
asterisk type a ~ before the character.

Returns the value for the first 7 characters

Returns the match value for the first “ast” in the


name

Uses both “?” and “*” to search for the first


match of a text

Manipulation: Other operations can be performed on VLOOKUP formula results such


as multiplying or dividing two VLOOKUPS with each other.

Copyright 2016 Leila Gharani 75


Top Excel Formulas Every Analyst Should Know

Nesting: You can also use “nested” formulas with the IF function.

Limitations of VLOOKUP

One major limitation of VLOOKUP is that it cannot look to the left. The values to lookup
must always be on the left-most column of the range and the values to return must be
on the right hand side.

Two way lookups aren’t permitted with VLOOKUP. You cannot use the standard
VLOOKUP to look at the columns and the rows to find an exact match. The INDEX and
MATCH functions are used in this instance and are much more flexible than the
classical VLOOKUP.

Tip: Although the CHOOSE function nested in VLOOKUP is a “workaround” tool, the
Index and Match combination is more effective to look data up in any direction.

Copyright 2016 Leila Gharani 76


Top Excel Formulas Every Analyst Should Know

Function #5: INDEX & MATCH for Flexible Lookups


Here are some of the reasons why Excel experts generally substitute VLOOKUP with
INDEX and MATCH.

 Unlike VLOOKUP, which searches only to the right, INDEX and MATCH can
look in both directions – left and right.
 INDEX & MATCH can perform two-way lookups by both looking along the rows
and along the columns to find the intersection within a matrix.
 INDEX & MATCH is less prone to errors. Assume you have a VLOOKUP where
the final value you want returned is in column N. Your lookup value is in column
A. You need to highlight the entire A to N range and then provide your index
number to be 14. If you happen to delete any of the in-between columns, you
would have to update that index number. You don’t need to worry about this
when you use INDEX & MATCH.

All in all, INDEX and MATCH is more flexible than VLOOKUP.

What it is

INDEX and MATCH are “nested” functions - two functions used together.

The first argument of INDEX is to give it an array. This array (range) should include your
answer. You then need to specify how many rows to go down and how many columns
to move to find the correct value. You cannot move outside the INDEX range.

The syntax of INDEX is:

 The range where the return value resides.


 Number of rows to move down (the row index)
 Number of columns to move to the right (the column Index). This argument is
optional. If you only have one column, you can leave the column argument
empty, otherwise, you need to specify the number of columns to move over, in
the range.

Here is an example of INDEX without MATCH:

Copyright 2016 Leila Gharani 77


Top Excel Formulas Every Analyst Should Know

As shown above, INDEX alone is not useful for identifying the number of rows or
columns to move. This is where MATCH comes into play. It helps the INDEX function to
locate the answer.

The MATCH function was designed to return the position or address of the lookup value
to the INDEX function. This is what differentiates MATCH with other functions. It does
not return the VALUE in the cell but returns the POSITION of the cell within a specified
range.

The MATCH function’s syntax is as follows:

 Like VLOOKUP, Match needs a lookup (target) value. The user can reference a
cell or directly type the value into the formula.
 Lookup_array: The “list” (range) where the return values are located.
 Match_type: 0 for an “exact” match.

In the below example, the MATCH function returns the value of 4. 200 is 4 rows down
from the specified range.

The important point to note on the MATCH function is that it’s a one-way street – you
can only have one row or one column selected.

Tip: If your MATCH contains multiple criteria then you


need to turn the multiple criteria into a one-way street.
You can do this by wrapping the MATCH function inside
another INDEX or by converting your formula to an
array – CSE – function. To watch this in action, refer to
the INDEX & MATCH Lecture in my Advanced Excel
Training XelPlus.com/AdvancedExcelCourse

Copyright 2016 Leila Gharani 78


Top Excel Formulas Every Analyst Should Know

Putting it together

When INDEX and MATCH are used together, the MATCH function finds the look up
value’s row / column index and then hands this value off to the INDEX function to get
the lookup value. The example below shows how these work in tandem.

This formula can be further manipulated to find the entity with the highest sales. To do
this, simply nest the MAX() function inside the MATCH function to find the location of
the highest number.

Copyright 2016 Leila Gharani 79


Top Excel Formulas Every Analyst Should Know

The VLOOKUP function has to include all the columns in your range even if in-between
columns aren’t needed. INDEX and MATCH only requires the return value column
which can significantly reduce processing time in larger worksheets.

The easy way to remember the syntax of the INDEX and MATCH is

=INDEX (The range location of my answer, MATCH(The value I’m looking for, The look-
up range to find the Value, 0))

Matrix Lookups

Use INDEX MATCH & a second MATCH in cases where you need to look up a value in
a matrix. MATCH is used twice: once for the rows and once for the columns. In this
example, the return range in the Index function involves multiple columns and the
MATCH function instructs the formula to move down a certain number of rows and
move over a number of columns across the sheet to retrieve the desired value.

Instead of just selecting a single row or column you need to index the entire table with
multiple rows and columns as your array since your value is somewhere inside this
matrix.

Copyright 2016 Leila Gharani 80


Top Excel Formulas Every Analyst Should Know

The syntax of the INDEX MATCH MATCH function is:

=INDEX(The full range where your answer can be found in, MATCH(The value I’m
looking for in the rows, The range I need to find the Value, 0), MATCH(The value I’m
looking for in the columns, The range I need to find the Value, 0))

Building on the INDEX and MATCH Function

By nesting INDEX and MATCH in other formulas you can create more complex,
dynamic calculations. The example below, shows how you can nest INDEX and
MATCH in the SUMIFS function. This way you can show the SUM of either the sales
column or the volume column depending on whether you select “Volume” or “Sales” in
G4. The summing value criteria it uses are West_01 in column A, 2014 in B and Jan in
C. Once you change the value in G4 from “Volume” to “Sales”, the results are changed
to SUM the values from the sales column. This can be used in dynamic dashboard
reports.

Copyright 2016 Leila Gharani 81


Top Excel Formulas Every Analyst Should Know

INDEX & MATCH is one of my favourite functions because it can be used in many
complex situations. A complete understanding of this function is what separates the
gurus from the norms.

Copyright 2016 Leila Gharani 82


Top Excel Formulas Every Analyst Should Know

Function #6: The Most Useful Text Functions


Text formulas are a great time saver for cleaning data and transforming them into
formats you need. Sometimes you need to manipulate the product descriptions or
remove a particular wording in a certain portion of a text string. The below list includes
the most oft-used Text formulas.

UPPER, LOWER and PROPER

These functions “toggle” between capital letters and small letters. UPPER switches the
selected characters to upper-case and LOWER to lower-case characters. The PROPER
function is the combination of upper and lower cases: the first character is changed to
upper case while the other characters are switched (or kept) in lower-case.

LEN

The LEN formula counts the number of characters in a cell. This includes any spaces
before, between or after words.

TRIM

The TRIM function removes any trailing spaces in a cell that occur before and/or after
any words. It doesn’t remove spaces between words unless they have more than one

Copyright 2016 Leila Gharani 83


Top Excel Formulas Every Analyst Should Know

space. TRIM is generally used to remove trailing spaces from data that is pulled from
another database or data copied and pasted into Excel from non-Excel files. Leading or
trailing spaces cause VLOOKUP or INDEX and MATCH formulas not to able to find
your data due to the extra space(s). In these cases, use TRIM to “trim” those unwanted
spaces before performing the lookup.

LEFT, RIGHT, MID

These functions are quite useful for parsing out parts of text. The LEFT function, for
example, will strip out the left part of the text. This is accomplished by providing the
function with the number of characters that should be “stripped out”.

For example, =LEFT(“TRY ME”, 3) results in TRY.

The RIGHT function behaves the same way except that it strips out the right part of the
text or text string. The MID function will strip out the mid sections of the text. However,
The MID function requires the starting character count in the text (or text string) to work.

These functions are not very flexible because they need to know exactly how many
characters to strip out and can’t “find” spaces between characters. To find spaces
where they occur between words and to also cause the LEFT, RIGHT and MID
functions to become more dynamic use the SEARCH and FIND functions.

SEARCH and FIND

These two functions are alike except that the FIND function is case sensitive and the
SEARCH function is not. SEARCH also allows for wild cards. The SEARCH and FIND
functions help find the spaces, any specific words and/or letters in your characters.

Copyright 2016 Leila Gharani 84


Top Excel Formulas Every Analyst Should Know

Putting it all Together

The above functions used as standalone function can be useful if working with static
text length. If, however, the text length constantly changes and you need to remove
certain parts due to the varying text lengths then it’s necessary to combine the formulas.

In the example above, LEFT, PROPER and SEARCH are “nested” to strip out the first
name. The RIGHT, PROPER, LEN and SEARCH are then “nested” to strip out the
family name.

These Text formulas can save a great deal of time cleaning up your data and getting
them in the format you need. Keep in mind this is not an exhaustive list. It’s what I find
to be the most useful text functions in Excel. Whenever you need to manipulate text,
codes or descriptions think of these functions and how you can combine them to get the
result you want.

Copyright 2016 Leila Gharani 85


Top Excel Formulas Every Analyst Should Know

Function #7: Excel's Top Date Functions


Excel’s date functions store dates as serial numbers representing the days since
January 1, 1900. The following date functions are very useful:

DATE

The DATE () function combines values from different cells that denote the year, month
and day date elements into a single cell to create a single date. The YEAR(), MONTH()
and DAY() functions do the opposite: they strip out each relevant section from the date
and display it separately in a cell.

WEEKDAY

WEEKDAY() function returns the weekday number from a given date. This function is
useful for showing trends by weekdays. For example, to compare Monday sales to
Tuesday sales or weekend sales, write the Weekday formula as follows:

=WEEKDAY(Date , variable that determines when the week starts)

See the image below for a list of variables.

Copyright 2016 Leila Gharani 86


Top Excel Formulas Every Analyst Should Know

In the example above, 6 is returned by the WEEKDAY function for the date 21/03/2015.
This means the 21st of March is the 6th day of the week. In this example, 2 is selected as
the variable which means 1=Monday and 6=Saturday. Looking at the calendar confirms
this. If you leave the optional variable out of the formula, Excel takes the default 1 for
the first day of the week, which is a Sunday.

WORKDAY

WORKDAY is another great function for creating project timelines or reporting


deadlines. WORKDAY returns the end date based on a starting date plus the number of
days needed to complete the task. This function EXCLUDES weekends by default so
keep this in mind when using it. Holidays can also be excluded if you provide the dates
for the holidays to the formula.

Prior to Excel 2010, weekends were always assumed to be Saturday and Sunday.
Starting from Excel 2010, it’s possible to select when weekends start depending on the
country.

In the above example, assume you are creating a deadline report memo. Enter the
starting date followed by the number of working days (column B). Include any holidays
that might occur during these days (as in B5 & B6). Note that you need to create a
holiday date table somewhere in your spreadsheet. Once these have been listed, you
can write your formula as in E3.

=WORKDAY(“Starting Date”, “number of working days”, “List of holidays”)

Copyright 2016 Leila Gharani 87


Top Excel Formulas Every Analyst Should Know

That’s it! You now have a dynamic formula that can calculate your end date, based on
any start date and the number of working days you specify. This saves time and
potential errors when designing your timeline.

NETWORKDAY

NETWORKDAY function determines the number of working days between two dates. It
also excludes weekends by default. Just like the WORKDAYS function, you can
exclude holidays as long as a list of these are included in your spreadsheet.

It is also important to note that NETWORKDAY also excludes start and end dates.

The function is written as follows:

NETWORKDAY(Starting date, End Date, List of Holidays)

In the above example, you can see that if holidays are included in the calculation then
the number of working days between 31.dec and 05 Jan is 2. If holidays are excluded
from calculation, the number of working days is 4.

To Recap

Date functions are great when you need to create a timeline for your project, reporting
timetable or list of tasks with deadlines. What people often do is to look up the days in
the calendar. Use Excel’s DATE functions instead because they don’t just save time,
but save you from making mistakes.

Copyright 2016 Leila Gharani 88


Top Excel Formulas Every Analyst Should Know

Function #8: OFFSET for Dynamic Calculations


OFFSET tells Excel to “fetch” a cell location (address) from within a data range.

The offset formula looks like:

=OFFSET(starting point, rows to move, columns to move, height, width)

Explained visually:

Here are practical uses of OFFSET:

 Dynamic Calculations: The OFFSET formula can be included in other Excel


functions to get dynamic ranges. For example, calculating the average sales of
the last 3 months based on a selection
 Flexible Chart Ranges: In conjunction with charts it can be used in the NAME
manager to add flexibility to chart data. The OFFSET function behaves like an
Excel table where the data range automatically expands and contracts when
chart data is updated.
 Dynamic dashboards: It can be used together with Excel’s Form Options to
allow for dynamic analysis and reports based on user-selection.

You can tell the OFFSET function to return one cell if you specify height and width as 1.
It can return an array of cells when the height and width are greater than 1. Height
and/or width CANNOT be zero, because you either need 1 cell or a range of cells. In
the illustration above, the height and width are 2.

The example below illustrates how it’s used in practice. You’d like a report to provide
the average sales totals for the last 6 months.

Copyright 2016 Leila Gharani 89


Top Excel Formulas Every Analyst Should Know

Assume, July is the last month - row 8. A static formula would be written as shown in
D2. The answer returned is 113 - the average of cells from B3:B8.

When August is added, the 6-month range would have to be updated manually from
B3:B8 to B4:B9. To avoid having to change this manually each month use the OFFSET
and COUNTA functions together to create a dynamic range that updates automatically
each month. COUNTA determines the data range and the OFFSET provides the 6-
month average range by moving up 6 rows starting from the last value in the range.

The OFFSET section is explained below.

To help understand how this works, use the Evaluate Formula tool. The intermediary
results of your formula, help you follow OFFSETs arguments in more detail.

OFFSET is an interesting formula and it’s one that can do so much more than meets the
eye. It can used inside many formulas to provide them with flexible ranges instead of
fixed ranges. This makes it a perfect candidate for dynamic reports and dashboards.

Copyright 2016 Leila Gharani 90


Top Excel Formulas Every Analyst Should Know

Function #9: FREQUENCY, SMALL & LARGE


The FREQUENCY, SMALL and LARGE functions are very effective in organizing and
presenting data. The FREQUENCY function is often overlooked because it’s an array
function that requires Control Shift Enter (CSE). This means it has to be entered in a
special way. It is, however, an extremely simple formula that saves a tremendous
amount of time. Simply put - FREQUENCY organizes data between categories (bins).

The MAX and MIN functions are popular choices for returning the high and low values
in a data set. Their useful counterparts, LARGE and SMALL, work in a similar manner
except you can control the number 1 largest or number 2 largest value, etc. that’s being
returned.

FREQUENCY

FREQUENCY function counts the number (occurrence) of times


an element appears in specified groupings (bins) within the
defined data set (range). For example, assume you need to
report the number of people in your department who fall between
specific age categories. Column A shows people’s ages and
column B defines the age groupings (bins). These “age” bins fall
into the following group: # of people less than 20; # of people
between 20 and 30; # of people between 30 and 40; and the # of
people between the ages of 60 to 100.

FREQUENCY quickly counts and allocates the number of people


that fall within these categories.

Once catch is that FREQUENCY is an array formula. To work


properly it needs to be written between two curly brackets --
“{FREQENCY()}”. You cannot manually input the curly brackets.
You need to follow these steps:

1. Highlight the cell range where the formula is to be used – i.e. the cells where you
want the answers to appear. In this example, it would be range (C2:C7)

2. Type =FREQUENCY(Highlight raw data in column A , highlight your groups in


Column B)

Copyright 2016 Leila Gharani 91


Top Excel Formulas Every Analyst Should Know

3. Press “Control + Shift + Enter” instead of Enter. CSE tells Excel to put the curly
brackets (“{}”) around the formula which converts it to an array formula.

With one simple formula, you get the number of people that are assigned to each age
group.

The same concept applies to reports that groups companies based on revenue or other
factors. Using this simple formula avoids having to do this manually or having to create
complicated nested formulas.

MIN, MAX, SMALL and LARGE

The MIN and MAX functions find the smallest and largest value in your data set. The
SMALL and LARGE functions find the nth smallest or the nth largest data (with n being
any integer value). If you wanted to show the highest sales value, for example, in a data
range you would use the MAX function. However, to show the second and the third
highest sales values you would need the LARGE (“data range”,2) and LARGE(“data
range”,3) formulas.

Copyright 2016 Leila Gharani 92


Top Excel Formulas Every Analyst Should Know

These are very useful functions for creating dynamic reports. Coupled with INDEX and
MATCH you can find the actual company that had the highest, second highest and third
highest sales. The example below demonstrates how this works.

MIN and MAX functions are used in cells H3 and I3 to find the age of the youngest and
the oldest person respectively. SMALL is used to find the age of the 3rd youngest
person and LARGE is used to find the age of the 3rd oldest person.

In order to find the names associated with each, INDEX and MATCH is used in row 4
(formula is shown in row 5).

To Recap

FREQUENCY function is a very simple formula that provides you with the number of
occurrences within your data for specific intervals. You can use this for salaries,
revenue, quantities or anything numeric. Don’t forget Ctrl + Shift + Enter. The MAX,
MIN, LARGE and SMALL functions are great when you need to organize your data and
provide a specific ranking or order to your data.

Copyright 2016 Leila Gharani 93


Top Excel Formulas Every Analyst Should Know

Function #10: SUMPRODUCT for the Gurus


The SUMPRODUCT function is THE function to work smart in Excel. This function
wears many hats and has many uses other than the traditional sum of products formula,
which the name implies.

SUMPRODUCT is an array function but is different than most of Excel’s array functions
in that it doesn’t require Ctrl + Shift + Enter (CSE). SUMPRODUCT can be used to help
solve many problems in non-obvious ways. SUMPRODUCT can be used like SUMIFS,
it can be used to COUNT and it can also be used like INDEX and MATCH.

First off lets demonstrate the classical use of SUMPRODUCT.

This function can be written in two ways which returns the same result. Using either
Excel separator “,” (comma) or using the multiply sign “*” (multiplication) performs the
matrix algebra calculation. However, when SUMPRODUCT is used in non-classical
ways, it is generally necessary to use “*” operator instead of the “,”. I will explain why in
a bit.

One of the advantages that SUMPRODUCT has over SUMIFS is that it can understand
OR conditions besides checking for AND conditions. OR conditions are written in
SUMPRODUCT using the “+” operator. AND conditions are denoted using the “*”
operator. Using parenthesises to group the And / OR criteria is crucial for the
SUMPRODUCT function to interpret the different criteria groupings properly.

The below illustrates some of the different ways of writing the SUMPRODUCT function.

The formula translation for “sum of sales in cell I6” is as follows:

SELECT SUM(sales) FROM Sales (column D) WHERE Entity=West_01 or


Entity=East_01, Year=2014 and Month=Jan

Copyright 2016 Leila Gharani 94


Top Excel Formulas Every Analyst Should Know

Below shows the SUMPRODUCT function in slow motion:

Note that in the first step, the function translates each calculation to either TRUE or
FALSE. Excel cannot add TRUE’s or FALSE’s since these are considered to be text
strings (i.e. Boolean Logic). A mathematical operation of some type (e.g. addition,
multiplication, etc.) has to be performed on these Boolean values to convert them to 1’s
and 0’s. The use of the “*” operator here performs the math operation (multiplication)
and converts the Boolean values (i.e. True and False) to the integers 1 and 0. After
converting to 1’s and 0’s, multiplication is performed on the remaining formula
members. This is why you need to use “*” operator instead of “,” if you use
SUMPRODUCT in this form.

The 1’s and 0’s resulting from the Boolean math results allows the SUMPRODUCT to
behave as a “Counting” function because each value being compared ends up
occurring either 1 time (the TRUE result) or 0 times (the false result).

Can you see why SUMPRODUCT is such an unusual and useful function? It’s not just
the sum of products, but you can use it as a COUNTIF function, a SUMIF function, a
LOOKUP function and more!

Copyright 2016 Leila Gharani 95


Top Excel Formulas Every Analyst Should Know

Concluding Words
Let’s take a look at what we covered:

1. SUMIFS & COUNTIFS


2. IF - Nested Functions
3. IFERROR for Credible Reports
4. VLOOKUP & HLOOKUP for Dynamic Lookups
5. INDEX & MATCH for Flexible Lookups
6. The Most Useful Text Functions
7. Excel's Top Date Functions
8. OFFSET for Dynamic Calculations
9. FREQUENCY, SMALL & LARGE
10. SUMPRODUCT for the Gurus

With these functions you are well equipped with the knowledge you need to handle
pretty much any situation that requires you to analyse data or grab a piece or pieces of
information from a large table.

Copyright 2016 Leila Gharani 96


The Advanced Excel Online Course

The Advanced Excel Online Course


To WATCH these Tips and Formulas in action, check out my online course:
XelPlus.com/AdvancedExcelCourse - A discount coupon is included there.

Other Online Courses

Excel Charts:
Ultimate Excel
Visualization Secrets
Waterfall Chart Course
for Impressive Charts
http://www.xelplus.com/ExcelChartCourse http://www.xelplus.com/WaterfallCourse

Looking forward to “seeing” you there!

Copyright 2016 Leila Gharani 97

Potrebbero piacerti anche