Excel Imp Formulas
Excel Imp Formulas
Excel Imp Formulas
1. SUMIFS Formula
If you
listen very carefully, you can hear thousands of managers around the world screaming How many x
we did in region A, product B, customer type C in month M? right now.
To answer this question without the song and dance of excessive filtering & selecting, you must learn
SUMIFS formula.
This magical formula can sum up a set of values that meet several conditions.
The syntax of SUMIFS is like this:
=SUMIFS( what you want to sumup, condition column 1, condition, condition column 2, condition.)
Example:
=SUMIFS(sales, regions, A, products, B, customer types, C, month, M)
Learn more about SUMIFS formula.
2. VLOOKUP Formula
Pop quiz time .
Which of the below things would bring world to a grinding halt?
A. Stop digging earth for more oil
B. Let US jump off the fiscal cliff or hit debt ceiling
C. Suddenly VLOOKUP formula stops working in all computers, world-wide, forever
If you answered A or B, then its high time you removed your head from sand and saw the world.
The answer is C (Well, if all coffee machines in the world unite & miraculously malfunction that would
make a mayhem. But thankfully that option is not there)
3. INDEX+MATCH Formulas
For every 10 people using VLOOKUP, there is someone realizing its most annoying
limitation. VLOOKUP formula can only search on left most column.
That means, if a table of customers has customer ID in left column and name in right column, when
using VLOOKUP, you can search for customer ID only.
You cannot ask questions like what is the customer ID of Samuel Jackson ?
VLOOKUP would choke and bring your Excel world to a grinding halt.
Thankfully, INDEX+MATCH formulas come to rescue. These 2 beautiful formulas help us lookup on any
column and return corresponding value from any other column.
Syntax:
=INDEX(list of values, MATCH(what you want to lookup, lookup column, is your lookup column
sorted?))
Example:
=INDEX(customer IDs, MATCH(Samuel Jackson, Customer names, 0) )
Click here to learn more about INDEX & MATCH formulas.
4. IF Formula
Q: What do you call a business that does not make a single decision?
A: Government!
Jokes aside, every business needs to make decisions, even governments!!! So, how do we model
these decisions in Excel.
Using IF formulas of course.
For example, lets say your company decides to give 10% pay hike to all people reading Chandoo.org &
5% hike to rest. Now, how would you express this in Excel?
Simple, we write =IF(employee reads Chandoo.org, 10% hike, 5% hike)
The syntax of IF formula is simple:
=IF (condition to test, output for TRUE, output for FALSE)
Click here to learn more about IF formulas.
5. Nesting Formulas
Unfortunately, businesses do not make simple decisions. They always complicate things. I mean, have
you ever read income tax rules?!? Your head starts spinning by the time you reach 2nd paragraph.
To model such complex decisions & situations, you need to nest formulas.
Nesting refers to including one formula with in another formula.
An example situation: Give 12% hike to employees who read Chandoo.org at least 3 days a week,
Give 10% hike to those who read Chandoo.org at least once a week, for the rest give 5% hike.
Excel Formula: =IF(number of times employee reads chandoo.org in a week >=3, 12% hike,
IF( number of times employee reads chandoo.org in a week >0, 10% hike, 5% hike))
You see what we did above? We used IF formula inside another IF formula. This is nothing but
nesting.
You can nest any formula inside another formula almost any number of times.
Nesting formulas helps us express complex business logic & rules with ease. As an analyst, you must
learn the art of nesting.
Lots of nested formula examples & explanations here.
What it does
Example
&
^
( )
[ ]
{ }
< > <= >=
= <>
Equality operators. Check whether 2 values are 2=2, hello=hello, 4<>5 will all return TRUE.
equal or not equal. Output will TRUE or FALSE
* ?
SPACE
7. Text formulas
While there are more than two dozen text formulas in Excel including the mysterious BHATTEXT (which
is used to convert numbers to Thai Bhats, apparently designed by Excel team so that they could order
Thai take out food #), you do not need to learn all of them. By learning few very useful TEXT
formulas, you can save a ton of time when cleaning data or extracting portions from
mountains of text.
As an aspiring analyst, at-least acquaint your self with below formulas:
LEFT, RIGHT & MID to extract portions of text from left, right & middle.
TRIM to remove un-necessary spaces from beginning, middle & end of a text.
Like wise NETWORKDAYS formula tells us how many working days are there between any 2 given
dates.
WORKDAY: Calculate the end date from a start date & number of working days
WORKDAY.INTL: Same as WORKDAY, but lets you use custom weekends. [Excel
2010+ only]
More on working with Date & Time values in Excel.
SMALL: Used to find nth smallest value from a list. Use it like =SMALL(range of
values, n).
RANK: Finds the rank of a value in a list. Use it like =RANK(value, in this list, order)
Errors, lousy canteen food & dysfunctional coffee machines are eternal truths of corporate life. While
you can always brown bag your lunch & bring a flask of finely brewed coffee to work, there is no
escaping when your VLOOKUP #N/As. Or is there?
Well, you can always use the lovely IFERROR formula to handle errors in your formulas.
Syntax:
IFERROR(formula, what to do in case of error)
Use it like:
IFERROR(VLOOKUP(.), Value not found!)
Click here to learn more about IFERROR Formula.
3 Bonus Formulas
If you can master the above 10 formulas, you will be ahead of 80% of all Excel analysts. Here are 3
more important formulas that can come handy when doing some serious data analysis work.
OFFSET formula: to generate dynamic ranges from a starting point and use them
elsewhere (in charts, formulas etc.).
SUMPRODUCT formula: Unleash the full power of Excel array processing by using
SUMPRODUCT.
SUBTOTAL formula: Calculate totals, counts & averages etc. on a range with filters.
your ideas