Escolar Documentos
Profissional Documentos
Cultura Documentos
Why does Sohail Anwar care so much about Excel? Surely hes a Microsoft salesman? Not quite. Frankly,
becoming very, very good with Excel over time has helped him tremendously to build a career in all
manner of Analytical and Management roles in the Financial Services, IT & Government largely by
applying Excel to solve real world problems. In 2005 he barely knew what an Excel cell was and he
earned slightly over the national average salary; in 2015 he can do everything but create human life with
Excel and has consistently been earning well over a 6 figure salary (British s) for several years.
Having put in over 10,000 hours of applying Excel in the workplace and teaching others to not only learn
the best of Excel quickly and efficiently, but to then translate that into higher earnings, he is now on a
mission to teach lots more people all they need to learn about Excel to earn a lot more money.
But if you go over to Earn and Excel, which is Sohails Blog, you will find a wealth of information on not
just Excel but the best advice you will come across on progressing your career.
INTRODUCTION
Why Excel Formulas?
Theres more to Excel than formulas, there are charts, data functions, tables, macros, VBA, etc., so why
just focus on formulas?
Formulas are the best place to start to attack your improvement; many other uses of Excel revolve
around formulas, and formulas will help you accomplish the majority of the problem solving you need to
do in Excel on a day to day basis.
With that in mind, there are around 300-350 formulas (depending on your version of Excel) so one of
the major benefits of this book is to help you narrow it down to the core formulas that you should focus
your precious little time on so you can get on with developing other crucial career/work skills rather
than spending too much time unnecessarily mastering Excel.
What do you mean by Money Formulas? Do you mean financial formulas?
No. I mean these formulas are on the money and focusing your efforts on applying them in your work
will set you on the path to ultimately earning more money. Granted, theres other things you need to be
good at in Excel and outside of Excel, but I am focusing on getting just one aspect right. When you have
many areas to improve in and a limited time to do so, it helps to have someone who has been there and
done that to narrow things down for you
So youre telling me if I learn just these formulas I will earn more money?
What I am telling you is this. If your rear end is sitting on a chair most of the day as you stare at a
screen(s) in some professional capacity, Excel is your friend and if you learn it and apply it correctly, well
then, Excel can be your best friend (just dont open conversations at a party with My best friend is
Excel, unless its a Microsoft party, even then its probably a no no).
Excel is a vast tool with many applications. Most people can easily get lost in what to learn, how to learn
it and where to learn it. The information overload can lead to spinning your wheels and giving up in
frustration. Ive worked alongside many people who initially gave up with Excel. Many of these folks
were quite non-technical and they really struggled. A few pointers in the right direction from me
boosted their confidence at using Excel to solve work related problems and most of them went on to
earn significantly more salary than they were previously doing.
But why would the geniuses at Microsoft invest time in creating all those other formulas?!
Because they have developed a complete product with incredible levels of application for tasks and
problems in all shapes and sizes to be applied across a huge range of sectors. They have monopolised
the spreadsheet product market because Excel is the de facto spreadsheet tool in just about any office
anywhere.
Many of the formulas I will tell you not to bother with because you are (or will be) professionals in the
roles/industries previously discussed and while these certainly do have uses, they are few and far
between. Very specialist engineering, niche finance/economic modelling, scientific researchers perhaps,
most of the applications in fact are in or tied to the academic sphere. And even then many folks will use
much more powerful and purposeful niche products for modelling, such as Matlab, Hadoop or just plain
old SQL so weve rendered most of those formulas useless still!
Financial Services (Banking, Accounting, Insurance), IT, Energy, Telecommunications, Retail (Head
office), Supply Chain, Government etc. Pretty much all Analyst roles, Management Consultants, Finance
professionals, Change Management and Project Professionals (especially PMO).
Professionals who am I not talking about: Lawyers for law related work (still great for other office work if
youre running your own practice).
II.
III.
They are annoying to format (not so much the colour scheme aspect, which is quite good, but
more the shape, size and location of the pivots. I prefer to have the smallest possible size of
information and put it where I want, knowing when I update I dont have to worry about how a
Pivot will self-adjust to the space Im working with).
Its not always obvious if there are issues with your source data, you may have to cleanse and
check with formulas anyway.
They can increase your file size (less of a big deal).
I do use pivots but only for quick and dirty analyses of information (more on that later), then for a more
permanent solution (i.e. ongoing report or dashboard) I set up swathes of counting and summing
formulas and format to my hearts content.
2. Finding Information
Needles in haystacks arent fun, unless you are Excel. Excel will help you find your needle in mounds of
haystacks and then it will tell you lots more juicy information about your needle!
Sure you can use Excels impressive filtering to help you (Auto Filter, Advanced Filter), but even then for
pinpoint accuracy and speed/efficiency you need to use formulas for your finding capabilities. Also
remember if youre summing information sometimes there might not be any pre-finding, just work with
source data if its in long boring lists (will get to this in the next section).
3. Treating information with rules
You can make your data conform to some rules to make it work better for you. The operative word
being IF. If the word in a cell is Green do something, if the date in another cell is prior to todays date
on this later.
4. Dealing with non-number information
Excel is fantastic at dealing with text information, which is absolutely essential for us professionals!
But what about the subsequent categories? Shall we write the formula again 5 more times? Thankfully
no. Phew! We can do one of two things:
1. Drag the formula down by clicking back into the cell, then clicking and holding the little square in
the bottom right and simply dragging it down as far as you want
(When you hover over the little square, the mouse cursor turns into a cross +)
2. Alternatively, you simply copy that formula (right click , select Copy or Ctrl + C), then highlight
all cells you want to place the formula and paste (right Click, select Paste or Ctrl + V)
When you store information in this manner, it will make it so much easier to use formulas to get the
information you need from them (as well as other Excel functions, especially filtering).
Whatever you do please avoid organising and storing information in any other way. For example, I have
seen the following:
To the Excel untrained eye, the second example looks far more aesthetically pleasing than the previous
Long boring list, however I assure you, to use formulas on this data to analyse will end in tears for the
most part! The rule is Long boring lists to organise and store your information and then use formulas
(with ease) and formatting to create nice aesthetically pleasing summaries of your information for other
people. If at work you have inherited someone elses spreadsheet and it doesnt contain information in
a long boring list then the best investment you can make for your time is to convert the information into
a long boring list.
The biggest tip I will give to help turn your information into a long boring list is to not look for efficiency,
make the list inefficient. By that I mean do not fear repeating information. If you look at the two lists
above, the non-boring one has 3 mini tables for Retail, one per Sub-Unit. It only lists the sub unit once
and the word Retail 3 times. In contrast the long boring list lists the word Retail on 6 occasions, one per
line and essentially a line represents one person. So work out your main data point, in the example
above, its a person, then use the columns to list all the other information about the data point, then
repeat for the other data points.
Operators
Operators will help you to get the most out of the formulas. Data + Operators + Money formulas =
success! Feel free to skim this section quickly for now, but do come back to it after you have gone
through the formulas list and it will hold greater meaning.
This isnt an exhaustive list of Operators, but these are the most commonly used ones.
Operator
Symbol
Equals
Multiply
Referencing
&
Concatenate
Join two or more values as text values whether they are text or not. i.e.
=(12*3) & " Months" results in '36 Months'
=
+,-, /
<>
>,<,>=,
<=
()
Parenthesis
{}
Curly brackets
?, *
Once you have moved past the obvious operators (+,-,* and /). The most important operator to
understand is $. Why? To acknowledge the all omnipotent power of the US economy? Err, not quite.
More to do with Absolute and Relative references.
The greatest value of the $ operator is when you need to drag/copy formulas across (vertically and/or
horizontally) and those formulas are referring to a single cell (i.e. A1) or a range of cells (i.e. A1:G20) that
need to be maintained (locked down). What do I mean?
Consider the following example where I want to look up the Office for a number of people, listed
horizontally in a vertically listed table of information. I write the following VLOOKUP in cell F3 to do so
I then drag this across (G3 & H3) expecting the correct result. See below I have an extra row, showing
the result and what the formula looks like after dragging (in Red text) .
We have ended up with 2 #N/A errors. This is because due to a lack of absolute references, the range
keeps shifting as we drag across (A: C becomes B: D after the first drag, then it becomes C: E after the
second drag) resulting in the incorrect range being queried. In this example we want it to be locked at A:
C and the way to lock down is to turn this into an Absolute reference by using the $ sign.
If we drag A across, it will become, B, C, D, E, etc.
But if we put a dollar sign and drag $A, it will always be A (or $A). Now we have locked the formulas
down, we get the correct result (no more #N/A errors)
Similarly if you want to drag downwards and lock the row number A$3 will ensure it remains A$3 all the
way. Using $ before both letter and number will result in no change no matter which direction you drag
(or even paste) it will always refer to cell A3.
Here is a table to explain the names of the references
Cell
A1
$A1
A$1
$A$1
Reference Type
Relative
Absolute Column, Relative Row
Relative Column, Absolute Row
Absolute
Although, dont worry about what they are called, terminology is not important. What matters is the
effect they have. The following table shows what happens when you put a $ before (Absolute
reference) or you dont put a $ before (Relative reference).
The best way to toggle between the reference types is to highlight or put the cursor at the cell(s)
reference and just keep pressing F4 till you have the desired reference type.
Processing Power
Occasionally I'll harp on about Processing Power. Since Excel has to do lots of calculations, in fact every
time you tell Excel to refresh (whenever you press enter in an active cell, every time you filter, open a
workbook etc.) you are putting 'strain' on Excel's memory, which borrows from your computer's
memory. So why am I telling you this? Isnt it a bit too off topic and defeating my purpose of saving you
time? Well, the more formulas you have throughout your spreadsheet, the more calculations will
happen and not all behind the scenes calculations are created equally, if you have tens of thousands of
formulas, your book will slow down, making your workflow frustratingly tedious and thus not saving you
time. So it's worth bearing in mind when Im talking about formulas with heavy processing needs that
perhaps explore options without spending too much time. As a rule, if you have a spreadsheet with
formulas working on thousands of rows (think SUMPRODUCT,SUMIF(S),INDEX,MATCH,VLOOKUP, etc.)
where you need columns of formulas, define your ranges i.e. A1:Z30000 rather than A:Z) and this will
really reduce processing strain.
Quick and dirty Analysis
Often in your Excel workflow you will want to 'check' some information. Someone emails you with a
random request for some information or you just need to work something out. So you do what I call a
'quick and dirty analysis' where you might just throw some data on a sheet and write some formulas (or
this is when I might use pivot tables) so you can give a response, then youre done with it and no one
need know that it was a messy bit of work!
Now my finance connections tell me that Red is bad, mkay but in this book, Red is hot, the good kind of
hot!
What do I mean by useful?
In my decade of solving professional problems, working with other brilliant Excel people and teaching
people to apply Excel, I have found time and time again that the useful formulas for summarising,
counting, rule making and dealing with text are:
1.
2.
3.
4.
Quick to set up
Frequently called upon
Obvious in how they work (so you can troubleshoot and deal with errors)
Take up the least processing power (the weakest factor, but important when dealing with big
files)
Ultimately useful in this context is summed up by the fact that these Formulas will make your problem
solving super easy, and highly effective with minimal fuss. Heres how the numbers stack up on the
Usefulness-Omoter
0: Forget about it
1-2: Its a rare instance that you may have to use these, so rare that you are better off spending the time
learning to hum the theme tune to the opening credits of Frasier (clue, there is no theme tune)
3-4: Worth being aware of but chances are there are alternative ways to achieve what you want
5: There is some functional value to these that you will struggle to get from the more important
formulas, but they dont crop up that often. Keep them in your back pocket
6-7: Not formulas that youll rely on daily and dont have huge versatility, but serve specific purposes
and when you get into advanced territory, youll call on them a bit more so I recommend them.
8: Utterly brilliant and will make your professional life much easier (maybe even your personal life)
9: Clever, versatile and life altering. You will operate so much better as a professional with these bad ass
formulas and they will even clear your skin
10: Imagine these as being akin to one of your 5 senses, an extension to your very being. Excel Nirvana is
attained with mastery of these. Ive been told Neo used these to control the Matrix.
With that said, I will spend more time explaining formulas that rank 8-10 and will sporadically touch on
5-7s where I feel its worth touching on and there will be almost no mentions of 4 and below!
Financial
Financial Continued
Statistical
Continued
Statistical
DATE
ACCRINT
XNPV
ABS
SUMIF
AVEDEV
NORMINV
DATEVALUE
ACCRINTM
YIELD
ACOS
SUMIFS
AVERAGE
NORMSDIST
DAY
AMORDEGRC
YIELDDISC
ACOSH
SUMPRODUCT
AVERAGEIFS
NORMSINV
DAYS360
AMORLINC
YIELDMAT
ASIN
SUMSQ
AVERAGEA
PEARSON
EDATE
COUPDAYBS
ASINH
SUMX2MY2
BETADIST
PERCENTILE
EOMONTH
COUPDAYS
DAVERAGE
ATAN
SUMX2PY2
BETAINV
PERCENTRANK
HOUR
COUPDAYSNC
DCOUNT
ATAN2
SUMXMY2
BINOMDIST
PERMUT
MINUTE
COUPNCD
DCOUNTA
ATANH
TAN
CHIDIST
POISSON
MONTH
COUPNUM
DGET
CEILING
TANH
CHIINV
PROB
NETWORKDAYS
COUPPCD
DMAX
COMBIN
TRUNC
CHITEST
QUARTILE
NOW
CUMIPMT
DMIN
COS
CONFIDENCE
RANK
SECOND
CUMPRINC
DPRODUCT
COSH
BESSELI
CORREL
RSQ
TIME
DB
DSTDEV
DEGREES
BESSELJ
COUNT
SKEW
TIMEVALUE
DDB
DSTDEVP
EVEN
BESSELK
COUNTA
SLOPE
TODAY
DISC
DSUM
EXP
BESSELY
COUNTBLANK
SMALL
WEEKDAY
DOLLARDE
DVAR
FACT
BIN2DEC
COUNTIF
STANDARDIZE
WEEKNUM
DOLLARFR
DVARP
FACTDOUBLE
BIN2HEX
COUNTIFS
STDEV
WORKDAY
DURATION
FLOOR
BIN2OCT
COVAR
STDEVA
YEAR
EFFECT
ASC
GCD
COMPLEX
CRITBINOM
STDEVP
YEARFRAC
FV
BAHTTEXT
INT
CONVERT
DEVSQ
STDEVPA
FVSCHEDULE
CHAR
LCM
DEC2BIN
EXPONDIST
STEYX
AND
INTRATE
CLEAN
LN
DEC2HEX
FDIST
TDIST
FALSE
IPMT
CODE
LOG
DEC2OCT
FINV
TINV
IF
IRR
CONCATENATE
LOG10
DELTA
FISHER
TREND
IFERROR
ISPMT
DOLLAR
MDETERM
ERF
FISHERINV
TRIMMEAN
NOT
MDURATION
EXACT
MINVERSE
ERFC
FORECAST
TTEST
OR
MIRR
FIND
MMULT
GESTEP
FREQUENCY
VAR
TRUE
NOMINAL
FIXED
MOD
HEX2BIN
FTEST
VARA
NPER
JIS
MROUND
HEX2DEC
GAMMADIST
VARP
ADDRESS
NPV
LEFT
MULTINOMIAL
HEX2OCT
GAMMAINV
VARPA
AREAS
ODDFPRICE
LEN
ODD
IMABS
GAMMALN
WEIBULL
CHOOSE
ODDFYIELD
LOWER
PI
IMAGINARY
GEOMEAN
ZTEST
COLUMN
ODDLPRICE
MID
POWER
IMARGUMENT
GROWTH
COLUMNS
ODDLYIELD
PHONETIC
PRODUCT
IMCONJUGATE
HARMEAN
CELL
GETPIVOTDATA
PMT
PROPER
QUOTIENT
IMCOS
HYPGEOMDIST
ERROR.TYPE
HLOOKUP
PPMT
REPLACE
RADIANS
IMDIV
INTERCEPT
INFO
HYPERLINK
PRICE
REPT
RAND
IMEXP
KURT
ISBLANK
INDEX
PRICEDISC
RIGHT
RANDBETWEEN
IMLN
LARGE
ISERR
INDIRECT
PRICEMAT
SEARCH
ROMAN
IMLOG10
LINEST
ISERROR
LOOKUP
PV
SUBSTITUTE
ROUND
IMLOG2
LOGEST
ISEVEN
MATCH
RATE
ROUNDDOWN
IMPOWER
LOGINV
ISLOGICAL
OFFSET
RECEIVED
TEXT
ROUNDUP
IMPRODUCT
LOGNORMDIST
ISNA
ROW
SLN
TRIM
SERIESSUM
IMREAL
MAX
ISNONTEXT
ROWS
SYD
UPPER
SIGN
IMSIN
MAXA
ISNUMBER
RTD
TBILLEQ
VALUE
SIN
IMSQRT
MEDIAN
ISODD
TRANSPOSE
TBILLPRICE
SINH
IMSUB
MIN
ISREF
VLOOKUP
TBILLYIELD
SQRT
IMSUM
MINA
ISTEXT
VDB
SQRTPI
OCT2BIN
MODE
XIRR
SUBTOTAL
OCT2DEC
NEGBINOMDIST
NA
SUM
OCT2HEX
NORMDIST
TYPE
Logical
Database
Text
Engineering
Information
Rating
(0 -10)
Formula
Rating
(0 -10)
Formula
Rating
(0 -10)
Formula
Rating
(0 -10)
ABS
FACT
ODD
SINH
ACOS
FACTDOUBLE
PI
SQRT
ACOSH
FLOOR
POWER
SQRTPI
ASIN
GCD
PRODUCT
SUBTOTAL
ASINH
INT
QUOTIENT
SUM
ATAN
LCM
RADIANS
SUMIF
ATAN2
LN
RAND
SUMIFS
ATANH
LOG
RANDBETWEEN
SUMPRODUCT
CEILING
LOG10
ROMAN
SUMSQ
COMBIN
MDETERM
ROUND
SUMX2MY2
COS
MINVERSE
ROUNDDOWN
SUMX2PY2
COSH
MMULT
ROUNDUP
SUMXMY2
DEGREES
MOD
SERIESSUM
TAN
EVEN
MROUND
SIGN
TANH
EXP
MULTINOMIAL
SIN
TRUNC
Business
Sub-unit
Employee ID
Name
Start Date
Grade
Role
Savings
Produced
03/10/2012
Analyst
174,291
23,000
224,534
60,000
122,311
33,000
204,394
65,000
278,178
65,000
Analyst
Associate
Vice
President
163,583
33,000
270,746
52,500
122,575
33,000
221,802
57,600
Retail
Branch
Branding
Retail
Branch
Branding
Retail
Online
22510871010
Sam Sung
9171071104
Sony Bravia
13/12/2012
Vice
President
46692115
Terry Tibbs
27/08/2009
Analyst
I
Budget
limit
per
project
J
No. Of
Projects
4
5
Retail
Online
Kerry Merry
16/02/2010
Retail
Cashpoint
Testing
89912826
Retail
Cashpoint
Testing
Paul Robinson
22/07/2013
4102691015
Shah Rukh
16/07/2013
Wealth
Client Systems
48198751
Amitabh Bachan
18/11/2009
Wealth
Client Systems
38151261
Hansel Mansell
04/08/2012
Wealth
Client Systems
79722293
Gretal Petal
20/06/2010
Analyst
Associate
Vice
President
Wealth
Relationship
Management
15393338
William Thornton
21/02/2014
Analyst
144,653
44,000
Wealth
Relationship
Management
95462532
Glenda Bender
30/07/2013
Analyst
181,663
33,000
Wealth
Relationship
Management
Vice
President
264,726
60,000
Finance
Forecast Team
6421091710
124,274
46,750
Finance
Forecast Team
218,304
52,500
Finance
Forecast Team
Finance
Cost
Reduction
91434352
Louis CK
Finance
Cost
Reduction
42843262
Saima Ahmad
6
7
3101033134
Vice
President
Associate
Vice
President
8
9
10
11
12
13
24456437
Marion Jones
22/11/2011
Chris Rock
03/12/2013
102742277
Dave Chappelle
05/02/2012
Analyst
Associate
Vice
President
439103175
Bill Hicks
06/05/2012
Analyst
194,161
83,000
04/10/2013
Vice
President
215,079
65,000
25/04/2010
Director
370,746
83,000
14
15
16
17
18
What are the total savings produced by Vice Presidents, whether Associate or not?
SUMIF(G2:G18,"*Vice*",H2:H18) = 1,897,763
SUMPRODUCT (8/10)
Sumproduct, it's used to calculate a bunch of numbers in one column by the corresponding bunch of
numbers in another column and then total them up. So it basically gives us Volume. Great. Next. Whoa
whoa, hold on there. Yes it does do that with numbers, but then some clever clogs, possibly while
intoxicated, decided to see what happens when you use Text with that. The results were awesome to
say the least. It upped Excel's summarising power dramatically. What we have now is essentially a
SUMIFs, but with far greater filtering capability. And whereas with SUMIF(S) we can total numbers from
only one column, here we can total multiple column in addition to setting conditions. Here are a few
examples on the dataset. Lets start some examples by replicating the SUMIF(S) problems from above
What are the total saving's produced by Finance?
SUMPRODUCT((A2:A18="Finance")*(H2:H18))= 1,122,564
What are the total savings produced by Retail Analysts?
SUMPRODUCT((A2:A18="Retail")*(G2:G18="Analyst")*(H2:H18))=460,185
What are the total savings produced by Vice Presidents, whether Associate or not?
Now Sumproducts dont like straightforward use of wildcards like SUMIF(S) (+1 for SUMIF(S)!) so we
need to get a bit creative here.
SUMPRODUCT((RIGHT(G2:G18,9)="President")*(H2:H18))=1,897,763
To briefly explain this, operate on the Role column (G). We easily apply the RIGHT formula here and
look for any entry in column G whose last 9 character end in President which is an alternative way to
meet our criteria.
The final example further demonstrates the powerful filtering capability of SUMPRODUCTS
Total Savings produced by Finance employees who started in 2013
SUMPRODUCT((A2:A18="Finance")*(YEAR(E2:E18)=2013)*(H2:H18)) = 339,353
So by wrapping the start date range (E2:E18) in the YEAR formula and looking for only 2013 entries,
what we have done is create a filter that says filter Business by Wealth and filter Start Date by 2013
which is equivalent to the image below:
Just bear in mind the picture above is a result of some image editing; its not possible to show two
filters as above!
There are a few rules for defining the ranges in SUMIF(S)/SUMPRODUCTS, follow these rules for
defining ranges in a sum product/SUMIF otherwise you will get N/A error:
1. The limits of the ranges in differing columns must always match (A2:A18, H2:H18 , not H3: H28) SUMIF(S)/SUMPRODUCT
2. Never define a limitless range (A:A, B:B) - SUMPRODUCT
3. Exclude the header row, as it will corrupt the numbers range SUMPRODUCT
Tip: For the majority of time use absolute references to lock down your ranges, only in certain
circumstances is it good to use relative references in defining your ranges (i.e. Dragging certain
formulas to make a big table or advanced formulas)
Now you may be asking if I deem SUMPRODUCT as more all singing all dancing then SUMIF(S) so then
why does it get an 8 and SUMIF(S) get a 9? Good question, it's because 90% of the time you only need a
basic SUMIF(S) set up to achieve your summarising needs, those with more time on their hands will
work out how to make SUMIF(S) do exactly that what SUMPRODUCTS can, but its a waste of time.
SUM (6/10)
There not much to add to the use of this formula that is taught on day 1 at elementary school. I'll offer
a tip which to use the keyboard shortcut Alt + = in the cell next to the range you wish to add
(horizontally or vertically).
SUBTOTAL (6/10)
Subtotal has two good uses. First, when using Autofilter you can use SUBTOTAL to give you the sum of
a column after filtering. So it becomes a 'physical' makeshift SUMIF(S) which is useful for when you're
doing a quick and dirty analysis for yourself. Second is when you are creating a totals column on some
report for example, if you use SUBTOTAL in place of SUM (everywhere), then when creating overall
totals SUBTOTAL will ignore all cells containing the subtotals as in the example below. (FYI The number
9 in the formula tells it to Add - see the Excel help for all other Total types like Average, Count, etc.).
ROUND/ROUNDDOWN/ROUNDUP
For when you only want to deal with part of a number. Note that if you're just rounding final numbers
(i.e. In summarising, for display) you can revert to the number format, in fact, select the cells you wish
to round and just use the rounding button on the 'Home' tab of the Excel Ribbon.
Rating
(0 -10)
Formula
Rating
(0 -10)
Formula
Rating
(0 -10)
Formula
Rating
(0 -10)
DATE
HOUR
SECOND
WORKDAY
DATEVALUE
MINUTE
TIME
YEAR
DAY
MONTH
TIMEVALUE
YEARFRAC
DAYS360
NETWORKDAYS
TODAY
YEARFRAC
EDATE
NETWORKDAYS
WEEKDAY
EOMONTH
NOW
WEEKNUM
Date and Time formulas just arent that big of a deal. Whilst Dates are frequently part of Spreadsheets
(Times, far less often), they are often dealt with by the equality/inequality operators (=, >, <, <>, =>, <=)
where they are used as part of some rule creation. Like if X occurred before 25 December 2014 then do
Y otherwise do Z (=IF(X<25/12/2014, Y, Z). Further to that last example its worth noting that the Date
formulas are not often used in isolation, but usually with other formulas
Occasionally you will want to extract the numbers that represent the Day, Month, Year in which case use
the DAY, MONTH, YEAR formulas to do so
NETWORKDAYS has uses if you're looking to work out the number of work days between two dates
factoring in holidays. WEEKDAY gives you the day of the week as a number and here's a combination
formula that will tell you the day today
=CHOOSE (WEEKDAY (TODAY (),
2),"Monday,""Tuesday,""Wednesday,""Thursday,""Friday,""Saturday,""Sunday")
One useful formula to note is simply TODAY (), this will give you todays date, so whenever you refresh, it
will update itself. Useful to use in combination formulas or for filtering purposes where you want to
compare a date to today's date.
Information
Information
Formula
Rating (0 10)
Formula
Rating (0 10)
Formula
Rating (0 10)
Formula
Rating (0 10)
CELL
ISERROR
ISNUMBER
NA
ERROR.TYPE
ISEVEN
ISODD
TYPE
INFO
ISLOGICAL
ISREF
ISBLANK
ISNA
ISTEXT
ISERR
ISNONTEXT
ISERROR (7/10)
The most useful formula in this section is ISERROR, since it will tell you if another formula you have
results in an error. Why is that useful? This will help us to handle it, typically with rules. It is not
uncommon to use ISERROR with IF. But what about the IFERROR? That is a very simple and convenient
combination of IF and ISERROR, but as the rules we build become more sophisticated IFERROR doesn't
give us enough.
What about the other Error checking formulas (ISNA, ISERR, ISREF)? They all check for very particular
error types whereas ISERROR checks for all errors. They are useful for something called Error trapping
when you are embroiled in some deeper data analysis and for the most part you just don't need to do
that deep analysis.
A brief mention for ISBLANK (5/10) which tells us if a cell has no contents. The major use for this is in
rule building, so once again using our friend IF, we can ask something like IF(ISBLANK(A1),X,Y) or in
plain speak if the cell A1 is empty then do X otherwise do Y.
Statistical
Statistical
Formula
Rating
(0-10)
Formula
Rating
(0-10)
Formula
Rating
(0-10)
Formula
Rating
(0-10)
AVEDEV
FDIST
MAX
SLOPE
AVERAGE
FINV
MAXA
SMALL
AVERAGEIFS
FISHER
MEDIAN
STANDARDIZE
AVERAGEA
FISHERINV
MIN
STDEV
BETADIST
FORECAST
MINA
STDEVA
BETAINV
FREQUENCY
MODE
STDEVP
BINOMDIST
FTEST
NEGBINOMDIST
STDEVPA
CHIDIST
GAMMADIST
NORMDIST
STEYX
CHIINV
GAMMAINV
NORMINV
TDIST
CHITEST
GAMMALN
NORMSDIST
TINV
CONFIDENCE
GEOMEAN
NORMSINV
TREND
CORREL
GROWTH
PEARSON
TRIMMEAN
COUNT
HARMEAN
PERCENTILE
TTEST
COUNTA
HYPGEOMDIST
PERCENTRANK
VAR
COUNTBLANK
INTERCEPT
PERMUT
VARA
COUNTIF
KURT
POISSON
VARP
COUNTIFS
LARGE
PROB
VARPA
COVAR
LINEST
QUARTILE
WEIBULL
CRITBINOM
LOGEST
RANK
ZTEST
DEVSQ
LOGINV
RSQ
EXPONDIST
LOGNORMDIST
SKEW
COUNTIF(S) (8/10)
COUNITF(S) complements SUMIF(S) and help paint a complete summarisation picture, they feature on
front pages of Dashboard/Reports, but I also use them extensively for quick and dirty analysis. For
example often a colleague shouts across the room, "Sohail, how many Analysts do we have?" Quick as a
flash, I'll open the data list I need to find that out, enter the following formula and respond with
COUNTIF (G2:G18,"Analyst") = 8
To which I'm met with a "And how many of those Analysts sit in wealth?"
"One second"...
COUNTIFS (A2:A18,"Wealth",G2:G18,"Analyst") = 3
"And, how many of those started since 2013?"...to which I reply "Come on, you know it's my porridge
time, it's gone all cold so kindly go and heat it up for me if you want more answers!"
And once that person comes back with my reheated porridge, I'll write this formula...
COUNTIFS (A2:A18,"Wealth",G2:G18,"Analyst",E2:E18,">31/12/2012") = 1
COUNITF(S) is a fantastic and formula, it gets an 8 rather than a 9, purely because on the balance of
work done by most professionals its less frequently used, but Im splitting hairs here by worrying
whether its an 8 or a 9. Befriend it!
MAX/MIN/LARGE/SMALL (6/10)
Technically they are finding formulas since they help you locate the biggest/smallest values in a list, but
you can use them to summarise (i.e. if your report has a section which is something like 'Highest
earning..." or "Earliest completion" (with dates), etc. They can also be good to use in conditional
formatting to highlight max min values in a list for visual inspection. What is the difference between
SMALL/LARGE and MIN/MAX, the former are more versatile in that you can pick the 2nd smallest or
10th largest etc. in a list whereas the latter are 1st largest/1st smallest. Bear in mind SMALL/LARGE use
far more processing power as they carry out an internal sort before ranking, we've already discussed
how processing power slows things down for lots of data, so use MIN/MAX where possible.
Text
Text
Formula
Rating
(0 -10)
Formula
Rating
(0 -10)
Formula
Rating
(0 -10)
Formula
Rating
(0 -10)
ASC
EXACT
MID
SUBSTITUTE
BAHTTEXT
FIND
PHONETIC
CHAR
FIXED
PROPER
TEXT
CLEAN
JIS
REPLACE
TRIM
CODE
LEFT
REPT
UPPER
CONCATENATE
LEN
RIGHT
VALUE
DOLLAR
LOWER
SEARCH
One of Excels strengths is the great job it does of working with Text information. As a professional this is
truly an invaluable section since dealing with text data is fundamental to most professionals.
First lets look at formulas that cleanse text data. By cleansing, I mean making the piece of data
appropriate to work with.
TRIM (7/10)
Removes all unnecessary spaces in the text in a cell (apart from 1 space between words)
PROPER (6/10)
Makes the text in a cell lowercase apart from the first character and any character after a full stop
CLEAN (6/10)
Very useful when you bring data from another source (maybe you've pasted stuff from a website) and
Excel doesn't lie some of the characters properly, resulting in nonsense, such as below. Let CLEAN take
care of it for you!
A1 contains the following The correct values can be found at located at the areas in
So writing =CLEAN (A1) gives us The correct values can be found at located at the areas in
So we got rid of the weird symbols but it did leave us with extra spaces, so as a rule when bringing data
in, use the following combo:
=TRIM (CLEAN (A1)) which gives The correct values can be found at located at the areas in
If you look carefully, this has taken care of the extra spaces around where the symbols were.
SEARCH (8/10) /FIND (5/10)
These two look for a single character or a sequence of characters in a cell, the difference is FIND is case
sensitive and SEARCH is case insensitive and this is the main reason I, and so should you, always default
to SEARCH. What you will end up with is the position number of where your character is (or string of
characters start) so it acts a bit like the MATCH function, if there is no number you will get an error
(#VALUE!).
The structure of SEARCH/FIND is the same:
SEARCH (what character or sequential characters are you looking for?, what/where shall I look?, shall I
start looking from a certain number of characters in or if not Ill start from the beginning)
There are 3 common uses of FIND/SEARCH. First is in combination with the LEFT/RIGHT/MID which Ill
address in a bit. Second is to help rule building with IF again and lastly for quick and dirty analysis,
possibly with auto filtering where you create a new column and see if for example the word "email"
exists in some text, then where the formula produces a number rather than an error you can filter and
investigate.
LEN (8/10)
This is short for length and it simply gives you a count of characters in a cell including spaces. For
example LEN ("Hello") results in 5. LEN ("12/02/2014") results in 9 but LEN (12/02/2014) results in 5
because while Excel perceives "12/02/2014" as text, 12/02/2014 is a date, so behind the scenes Excel
converts it to a serial number (41682) which has a length of 5.
LEFT, MID, RIGHT
These very useful formulas will extract characters from a cell.
LEFT (8/10)
Always starts extracting from left to right. Heres the structure:
LEFT (what/where is your text, how many characters shall I display starting from the left)
Lets say we want to know the first 5 characters of a unique reference number as it implies some useful
information, heres how we do it:
MID (8/10)
This is like LEFT in that it extract looking left to right, but the difference is you can decide how many
character in you want to start. Heres the structure:
MID (what/where is your text, how many characters in, how many characters shall I display starting
from the left),
To keep the example simple, let's say we have some Unique References where the letters always give us
region abbreviation and we know they occur 3 characters in.
RIGHT (8/10)
Always starts extracting from right to left. Heres the structure:
RIGHT (what/where is your text, how many characters shall I display from the right).
This example wants to do a very simple check to see if the word President is contained in column A so
we set a basic RIGHT formula to look at the last 9 characters and by making the whole thing equal to the
word President we are creating a check. If they contain the characters President it will result in a
TRUE, otherwise if not then we will get a FALSE output.
That covers the basics but before moving on I just want to give a simple example how we can
manipulate text data to make it fit for our purpose. A classic example, something I encounter in most
weeks at work is around extracting certain words. For example, we want the first name of a person
where names in a cell are in a First Name space Second Name format. So how can we extract just the
first name? What do all the names have in common? They all have a space between the first and second
names. So all we do is to use a formula to search for which number the space occurs:
Now if we put that number into a LEFT formula and say count up to this many characters (-1 since we
dont want to include the space) then we have a way to automatically extract just the first name!
Behold.
This is just a basic, but powerful example of some of the cool stuff Excel can do to handle text data.
Before ending this section, I may be lambasted by some for not rating the CONCATENATE function
highly, whilst it does something very useful which is to join the contents of two or more
cells/text/values, it has zero advantages over the ampersand operator (&) so don't bother with it.
Rating
(0 -10)
Formula
Rating
(0 -10)
Formula
Rating
(0 -10)
Formula
Rating
(0 -10)
ADDRESS
GETPIVOTDATA
LOOKUP
RTD
AREAS
HLOOKUP
MATCH
TRANSPOSE
CHOOSE
HYPERLINK
OFFSET
VLOOKUP
10
COLUMN
INDEX
ROW
COLUMNS
INDIRECT
ROWS
VLOOKUP (10/10)
Fanfare, trumpets.the VLOOKUP is a 10 out of 10! And lets take a look why
The VLOOKUP allows us to find information about some piece of data after its been identified in a list.
Its like hiring a private detective, the ultimate private detective.
Lets say you want to know more about a person, you would tell the private detective (the VLOOKUP
formula) the name of that person (lookup value), then the detective goes and finds the person (in a list
or range) and finds out all kinds of related information that is available.
Ultimately, a VLOOKUP helps us to find information in a list. Given that Im a visual person, let me
explain how we might use VLOOKUP to find things from a list and why with the following picture
If I wanted to know what colour hat #3 is wearing, I can see quite easily its orange or I know that #4
does not have a phone. Easy enough with 5 (somewhat creepy looking) stick men, but what if we had to
deal with say 10,345 stick men? Since most of us dont have a crazy photographic memory the visual
inspection task becomes absurdly difficult. Lets summarise this in a list
We can instruct a VLOOKUP to look for #9 and tell us its hat colour. So lets look VLOOKUPs structure:
VLOOKUP (What are you looking for?, Where shall I find it?, How many columns across shall I look for
the related information, shall I look for the exact item or if your data is sorted something that resembles
it?)
In this case our lookup value is simply 9, we are looking in the range A1:D10346 (we want the range to
cover all the columns we might want to look in), we want to go 2 columns in and we want the exact
match so we put 0 (or VLOOKUP gives you the option of choosing FALSE, which means the same as 0 in
this part of the formula)
Putting those in the formula we get VLOOKUP (9, A1:D10346, 2, 0) = Pink
Now that I have introduced the VLOOKUP, lets park it for a while. Im going to come back to VLOOKUP
several times more in the book, but I want to do it as I introduce more formulas so you can truly grasp
its value and why it gets a 10 out of 10.
Before I go on, I want to briefly mention the HLOOKUP, it is the VLOOKUPS evil horizontal cousin, why
does it get such a low rating? In my decade plus of using Excel at work I used it sparsely in the first year
then abandoned it once I realised that you should always endeavour to store data vertically, not
horizontally. So part of me giving HLOOKUP such a comparatively low rating is to further discourage you
lovely professionals to store data any way but vertically.
MATCH (9/10)
Whilst the detective we previously talked about found information related to a piece of data, another
formula simply lets us find where the data is by looking for a match, think of this as police putting an
APB (weve all seen 80s US cop shows right ?). They just want to find a match and identify the location
of a suspect.
So stepping away from crime analogies, MATCH will find a value in a list and tell you where it sits in that
list. The list can be vertical (i.e. long boring list) or horizontal, take a look at its structure:
MATCH (What are you looking for?, Where shall I look for it, shall I look for the exact item or if your data
is sorted something that resembles it?)
Now just a quick note to address second part of that formula: Where shall I look for it?
If you write a range like A1:A10, then the MATCH knows it has to look vertically and its result will be a
number between 1 and 10 (if a matching item is found). If you write a range like A1:J1 then MATCH
knows it has to look horizontally and again it will produce a number between 1 (A) and 10 (J) if a
matching item is found.
As much as I recommend working with data vertically, with MATCH you often want to exploit its ability
to work horizontally.
INDEX (9/10)
This uses position numbers to pinpoint data in a grid like crosshairs.
There are a couple of structures for INDEX, but Im showing you the most common one:
INDEX (tell me a range to look into, which row number in that range shall I look?, which column
number in that range shall I look?)
Since, the inputs to index are essentially co-ordinates, the output will be the contents of the cell
corresponding to the co-ordinates. Match is the perfect formula to supply index with coordinates, hence I like to think of MATCH and INDEX as best friends!
Lets get our heads round this a bit more. Take this grid which represents a support staff rota, we want
to see which staff member is going to cover Finance on Thursday. From a visual inspection we can see
where Bill Hicks will be.
So how do we set up INDEX to do this? And MATCH to do this for us? We know that in the grid which
has a range of B2:H6, Thursday is 4th along horizontally and Finance is 3rd along vertically, so we simply
plug all that into our Index formula:
INDEX (B2:H6, 3, 4) = Bill Hicks
But what happens when we don't want to visually work out how many rows and columns we need to
look? This is a very common scenario where there are too many rows and columns were dealing with.
That's when MATCH comes back into the picture, we simply replace the rows and column numbers with
the MATCH formulas we previously created as follows:
Lets first find the position of Thursday in row 1
MATCH ("Thursday", B1:H1, 0) = 4
Note the B1:H1 range is a horizontal one, so MATCH knows it needs to count 1(Column B), 2(Column C),
3(Column D)7(Column H). Though since it is looking for Thursday, it gets as far as 5 (E). Similarly, to
find the position of Finance:
MATCH ("Finance", A2:A6, 0) = 3
Again the A2:A6 tells MATCH to work vertically, starting at row 2 and count down 1(Row 2), 2(Row
3)..5(Row 6). It gets to 3 (Row 4) as it meets its objective and finds Thursday.
So we have coordinates, how do we get INDEX to give us the answer? Lets just remind ourselves of the
last INDEX formula we created
INDEX (B2:H6, 3, 4) = Bill Hicks
We simply substitute our MATCH formulas straight into the INDEX for one formula:
INDEX (B2:H6, MATCH ("Finance", A2:A6, 0), MATCH ("Thursday", B1:H1, 0)) = Bill Hicks
This example uses two MATCHES in one formula, but in most professional situations, youll probably just
need the one, since you may know that youre dealing with column 4 for example, so you might just
write:
INDEX (B2:H6, MATCH ("Finance", A2:A6, 0), 4) = Bill Hicks
Voila! Now we have a very powerful ability to do a lookup based on row and column content. Its worth
going through an example of how this lethal combo of MATCH and INDEX might prove useful over a
VLOOKUP.
Let's say every month the Finance team send us over some forecasts that we want to capture, so we
want to look up the values, here is the grid from one particular month (feel free to copy it and play
around):
A
1
2
3
4
5
6
B
Jan
118,000
120,000
106,000
135,000
125,000
Wealth
Retail
Finance
IT
HR
C
Feb
137,000
120,000
145,000
128,000
146,000
D
Mar
149,000
112,000
106,000
106,000
131,000
E
Apr
112,000
124,000
149,000
114,000
148,000
F
May
109,000
142,000
136,000
140,000
122,000
G
Jun
114,000
136,000
131,000
111,000
100,000
So we pre-set some VLOOKUPS in our spreadsheet and every month we paste the data somewhere that
we refer to in our VLOOKUP range. For it to work every month without thinking about it, we need for
the columns to always be in the same place. Heres an example (shortened to fit the page).
This is where the formula becomes dependent on the range ($A$1:$G$6) and the column numbers (2, 3,
4, 5) (Also please note how I have returned to using absolute references to ensure the range doesnt
shift).
Now, what if the next month Finance decides to send us this:
A
1
B
Jan
Feb
Mar
Q1 Totals
Apr
May
Jun
Q2 Totals
Wealth
118,000
137,000
149,000
404,000
112,000
109,000
114,000
335,000
Retail
120,000
120,000
112,000
352,000
124,000
142,000
136,000
402,000
Finance
106,000
145,000
106,000
357,000
149,000
136,000
131,000
416,000
IT
135,000
128,000
106,000
369,000
114,000
140,000
111,000
365,000
HR
125,000
146,000
131,000
402,000
148,000
122,000
100,000
370,000
Jan
Feb
Mar
Q1 Totals
Apr
2
3
Wealth
Retail
118,000
120,000
137,000
120,000
149,000
112,000
404,000
352,000
112,000
124,000
4
5
6
Finance
IT
HR
106,000
135,000
125,000
145,000
128,000
146,000
106,000
106,000
131,000
357,000
369,000
402,000
149,000
114,000
148,000
Notes on April
Above average
spend
Investigate
Have they
started?
May
Jun
Q2 Totals
109,000
142,000
114,000
136,000
335,000
402,000
136,000
140,000
122,000
131,000
111,000
100,000
416,000
365,000
370,000
This does not bode well for that lovely VLOOKUP we set up earlier which was going to save us time since
the range and column positions have all changed
Now our results are all messed up, the Jun one doesnt even make any sense! Of course, it just means
that we have to adjust our VLOOKUPS. It won't take a very long time in this case, but what if there are
many more columns and greater changes in the actual column positions, which is a very real work
scenario?
MATCH combined with INDEX will remedy this, so we tell MATCH to find the correct column to look for
and plug it into INDEX (along with the correct row).
Column: MATCH ($A10, $B$1:$J$1, 0) - where $A10 contains the department names
Row: MATCH (B$9, $A$2:$A$6, 0) where B$9 contains the months
We can write the following INDEX formula:
INDEX ($B$2:$J$6, MATCH ($A10, $A$2:$A$6, 0), MATCH (B$9, $B$1:$J$1, 0))
Dragging this across (which we can do by using relative references for the MATCH inputs and absolute
references for INDEX range) we get the correct result
Of course a limitation is other people changing the actual column names remaining, but one can get
creative with the text formulas and IF to build some rules, though some I've normally solved this by
asking teams not make such drastic changes!)
Another big victory INDEX/MATCH has over VLOOKUP is that you can find information to the left of the
values you are searching for. (However, in a quick and dirty analysis feel free to just temporarily adjust
your column positions and do a VLOOKUP where needed)
In conclusion between VLOOKUP, MATCH and INDEX you will become masterful at finding the
information you need.
CHOOSE (8/10)
Choose allows us to pick an item from a list of individual options. The first part of the CHOOSE formula is
the entry in the list you will define followed by the list which can be 255 entries long. The list can be
prewritten into the formula, for example:
CHOOSE (3,"Red", Green", "Yellow", "Blue") gives us Yellow
The list can refer to various cells, in any order we like, for example
So one of three formulas are being chosen by the index numbers and they all up different parts of the
list in A1:A10
CHOOSE somewhat bridges the gap between finding and rule building, it is definitely a worthy weapon
in the arsenal, but I have rated it a bit lower than some of the other useful formulas since its frequency
of usage is less that the others.
COLUMN (5/10)
COLUMN is very simple to use and it has very high value when using VLOOKUPs. All the formula does is
to tell you the number of the column it is in, you dont even put anything in the brackets! Madness!
If you have a load of VLOOKUPs which span a large horizontal range, you need to manually adjust the 3rd
part of the formula, the column number to look in, so we can either manually adjust each time we drag
or we can set up some kind of moving column index number. Using COLUMN () is one excellent way to
set up a column number that automatically moves: lets have a look...
Let's say you need to drag the following formula horizontally from cell B2 to ZZ2000 too lookup some
info, well the span is 51 columns, so we could manually enter the column index number each time i.e.
2,3,4,5 etc. or providing the table of VLOOKUPS we are creating structurally matches the data we are
looking up from (i.e. your data is in columns A:Z and your VLOOKUPS are also in columns A:Z but lower
down perhaps or even on another worksheet but still in A:Z) then we can replace the column number
with the formula COLUMN():
I.e. we have the formula VLOOKUP ($A1, $A$1:$ZZ$2000, 2, 0) and we want to drag/copy it from column
B to ZZ, we simply replace the column number with
However entering COLUMN () in place of the column index number will result in the column auto adjust
as you drag, saving lots of time!
VLOOKUP($A$1,$A$1:$ZZ$2000,COLUMN(),0), VLOOKUP($A$1,$A$1:$ZZ$2000,COLUMN(),0)etc.
What looks like the same formula actually produces different results due to COLUMN () giving a different
result in every column.
ROW (5/10)
This works the exact same way as column, telling you what row you are in, but whilst COLUMN () works
wonders when dealing with lots of VLOOKUPS, ROW has benefits with more advanced formula building.
Its probably a bit out of scope for this book, but if you follow my work around the Internet I do discuss
its usage in constructing more advanced formulas.
INDIRECT (5/10)
This is used to refer to the contents of another cell. i.e. if you write "B1" in the cell A1, then in C1 you
type the formula INDIRECT(A1), then the result will be whatever the contents of cell B1 are, what?! I
barely followed that so let me give you a visual where C2 contains the formula and C1 contains the
result.
This is one of those formulas which is more of a function rather than a clever formula. Its used mostly in
making some pretty advanced formulas (not frequently used) or it is used to create multiple Data
Validation lists (both which are out of the scope of this book, but again look around the Web for me
talking about those topics).
Logical
Logical
Formula
Rating
(0 -10)
Formula
Rating
(0 -10)
Formula
Rating
(0 -10)
AND
IF
10
NOT
FALSE
IFERROR
OR
Formula
TRUE
Rating
(0 -10)
0
IF (10/10)
To make something obey us by treating it with rules allows us to explicitly make a decision which makes
IF infinitely useful to us. IF can allow us to make a simple rule or build very complex logic (akin to
programming), which is why IF gets a coveted 10 out of 10 on the usefulness-ometer! What do I mean
by treating with rules?
In Excel we want information to conform in a certain way for example, in column A we have test scores,
then in column B we can make a rule that says if the test score is above 50% then its a pass and below
50% its a fail.
IF has a simple construct IF (if this is true, do this, otherwise do this). So for the example above we can
write:
IF (A1>50,Pass,Fail)
And simply drag this down:
Without getting into the philosophy of logic, IF lets us to treat data with rules, we can then use multiple
ifs to build more sophisticated rules, such as the next example.
Lets say we want to create a list of what awards should be given to runners completing a marathon. If a
runner finishes a marathon in less than 3 hours then they are awarded a gold standard, if it's between 3
and 4 hours they get a silver standard and for more than 4 hours they get a bronze standard. I highly
recommend drawing a Tree diagram to help us visualise the logic, making it easier to then turn the
whole thing in to a formula
The best way to build logic with IF formulas is to eliminate outcomes, so in each branch of the tree
diagram, the state is either a particular outcome (took less than 3 hours) or not that outcome (did not
take less than 3 hours).
We have 3 outcomes we want to explore, but an IF can only produce 2 outcomes, so how can we deal
with this?
We Nest two IF statements.
Nesting IF statements (or other formulas but mostly IFs) means you build up formulas within formulas.
Why? In the case of IF where you can only have 2 outcomes, we replace one of those outcomes with an
entire IF statement. So we have one outcome from the first IF and two outcomes from the second IF,
giving us three outcomes! The following diagram shows this:
Outcome if YES
IF(Does runner takes less than 3 hrs?, GOLD, IF (Does runner takes less than 4hrs?,SILVER,BRONZE))
Question 1
Outcome if Question 2 No
Here are some more example of IF that should spark ideas in how to use them
IF (WEEKDAY (TODAY ())>5,"Weekend","Weekday")
Weekday gives you a number (from 1 to 7) of a day, we put today in there. If today happens to be a
Friday, the weekday is 5 and it will result in a false, so this produces a result of Weekday.
VLOOKUP (F3, IF (F2="Quarter 1", A1:B4, C1:D4), 2, 0)
This formula is interesting in that the IF statement gives us a range of cells as an outcome, either A1:A4
or C1:D4. By itself it would produce a #VALUE! Error, because if you put =A1:B4 in a cell, Excel gets
confused. However, a range fits nicely in say, a VLOOKUP, where you need to specify a range. Study the
example in the screen shot to see how it works:
Please not I am just illustrating a quick example above, but to take a quick tangent, the data is listed
horribly! (See long boring lists)
Okay, we previously talked about ISERROR, and how we use it, heres an example:
We are merely looking up from the table in A2:B7. The results go in columns E based on the
corresponding months is column D. We have one error, which comes from the fact that December
doesnt exist on our source data for the VLOOKUP. How can we deal with this messiness, which is an
issue when the list is very long? Easy? We wrap the VLOOKUP first in ISERROR, which gives us either a
TRUE or FALSE outcome.
Now we take that and place it into an IF statement, we are saying that if the VLOOKUP results in an
error, the ISERROR will produce a TRUE and trigger the true outcome which is a (produce an empty
looking cell), if its a FALSE, it will trigger the false outcome, which is simply the original VLOOKUP and so
we get the answer. As you can see it is cleaner.
What we just did in the very last example, can be achieved with even less work with a relatively new
formula from the Excel team called IFERROR, which simply states:
IFERROR (Put formula here & if its not an error youll get result, if its an error tell me what result to put)
So taking the previous example, rather than using IF, ISERROR, we are simply using IFERROR, simple!
This is a very typical usage of IFERROR, so should we ever bother with the IF and ISERROR combination?
Yes, we most definitely should. Heres when: When you want to check if a formula gives an error and
then state something about that:
So were not actually concerned with the result of the VLOOKUP itself but we want to register the
existence of an input. Heres another example.
Suppose we have a long list of role titles (or 4 in the example!) and next to each one we want to state
whether it is some kind of Vice President (VP) role. So we can use SEARCH and see if the words Vice
President crop up.
In two cases they dont, so we can use our IF and ISERROR combo to give a clean result
Rating
(0 -10)
Formula
Rating
(0 -10)
Formula
Rating
(0 -10)
Formula
Rating
(0 -10)
ACCRINT
DISC
NPER
SLN
ACCRINTM
DOLLARDE
NPV
SYD
AMORDEGRC
DOLLARFR
ODDFPRICE
TBILLEQ
AMORLINC
DURATION
ODDFYIELD
TBILLPRICE
COUPDAYBS
EFFECT
ODDLPRICE
TBILLYIELD
COUPDAYS
FV
ODDLYIELD
VDB
COUPDAYSNC
FVSCHEDULE
PMT
XIRR
COUPNCD
INTRATE
PPMT
XNPV
COUPNUM
IPMT
PRICE
YIELD
COUPPCD
IRR
PRICEDISC
YIELDDISC
CUMIPMT
ISPMT
PRICEMAT
YIELDMAT
CUMPRINC
MDURATION
PV
DB
MIRR
RATE
DDB
NOMINAL
RECEIVED
Engineering
Formula
Rating
(0 -10)
Formula
Rating
(0 -10)
Formula
Rating
(0 -10)
Formula
Rating
(0 -10)
BESSELI
DEC2HEX
IMAGINARY
IMPRODUCT
BESSELJ
DEC2OCT
IMARGUMENT
IMREAL
BESSELK
DELTA
IMCONJUGATE
IMSIN
BESSELY
ERF
IMCOS
IMSQRT
BIN2DEC
ERFC
IMDIV
IMSUB
BIN2HEX
GESTEP
IMEXP
IMSUM
BIN2OCT
HEX2BIN
IMLN
OCT2BIN
COMPLEX
HEX2DEC
IMLOG10
OCT2DEC
CONVERT
HEX2OCT
IMLOG2
OCT2HEX
DEC2BIN
IMABS
IMPOWER
Database
Formula
Rating
(0 -10)
Formula
Rating
(0 -10)
Formula
Rating
(0 -10)
Formula
Rating
(0 -10)
DAVERAGE
DGET
DPRODUCT
DSUM
DCOUNT
DMAX
DSTDEV
DVAR
DCOUNTA
DMIN
DSTDEVP
DVARP
I have placed these together since the rating on each of the formulas in these categories is a big fat zero!
The Engineering formulas are used for niche engineering modelling, which might prove useful for a
research engineer/scientist, but not a professional.
Believe it or not, having worked in financial services for many years, I have never met a person who has
needed the financial formulas, not even an actual finance colleague! They are used for niche financial/
economic modelling, but are of no use to professionals. All the modelling work invariably ends up
getting done using fairly standard formulas to translate your ideas.
Finally, the Database functions can have their use, but it requires a specific set up of data and you can
achieve the same outcome with other frequently used tools in Excel like filtering and sum/count
formulas, so they are surplus to requirements. Avoid.
Description by Microsoft
Specifies a logical test to perform
Looks in the first column of an array and moves across the row to
return the value of a cell
Uses an index to choose a value from a reference or array
Looks up values in a reference or array
Adds the cells specified by a given criteria
Returns a specified value if error otherwise returns value of formula
that has been input
Chooses a value from a list of values
Returns the sum of the products of corresponding array components
Counts the number of nonblank cells within a range that meet the
given criteria
Returns the leftmost characters from a text value
Returns the number of characters in a text string
Returns a specific number of characters from a text string starting at
the position you specify
Returns the rightmost characters from a text value
Finds one text value within another (not case-sensitive)
Returns TRUE if the value is any error value
Removes spaces from text
Returns a subtotal in a list or database
Adds its arguments
Counts how many values are in the list of arguments
Returns the k-th largest value in a data set
Returns the maximum value in a list of arguments
Returns the minimum value in a list of arguments
Returns the k-th smallest value in a data set
Removes all nonprintable characters from text
Capitalizes the first letter in each word of a text value
Ranking
10
10
9
9
9
8
8
8
8
8
8
8
8
8
7
7
6
6
6
6
6
6
6
6
6
INDEX/MATCH combo are just the most basic and wonderful way of pulling info from a list. They are not
going anywhere. So dont sweat the new versions. Yes they are nice but for practical reasons that other
colleagues and organisations will get confused by the new functionality, I dont bother with them.
In closing
Money Formulas are like those people who turn up to your social occasions. They are like Google. They
are like flu vaccines before getting on public transport. They are like quiet to a monk. They are like
caffeine to me as I write this book. They are your friends.
Having read this book, I hope you understand that it is an exercise in seed planting. Excel is an amazing
tool that is as significant as you want it to be in your career, the more significant the more your potential
for earning can be. With some direction from someone like myself who has spent his 10,000 hours
applying Excel in the workplace, I can distil its significance to in a fraction of the 10,000 hours I put in.
Consider the list of Money formulas as something of a roadmap to learn the most important formulas.
Honestly, pretty much all problems that you encounter can be addressed with just these few formulas.
So rather than give you a set curriculum (which whilst incredibly valuable, is a bit much for this book, but
please subscribe to learn more) please just have a go, pick one or more formulas at every opportunity
And most
importantly my fellow professionals, do not forget that these
27 Formulas which represent less than 10% of all of Excels
formulas will solve more than 90% of your problems, so please resist
and find an excuse to use them in a spreadsheet you are working on.
Sohail Anwar