Вы находитесь на странице: 1из 31

25 Excel Tips

Holiday gift eBook from Chandoo.org

Happy Holidays
25 Excel Tips
E-book from Chandoo.org
Hi there,
Thank you so much for getting a copy of the 25 Excel Tips book.
What is in this book?
We have 25 chapters in this book. Each chapter explains one tip or idea.
To get maximum benefit from this book:
Read one chapter at a time. Give time for the tips to sink in and apply them.
Each chapter also has some links at the bottom denoted with star & question mark
symbols. Click on these to learn more.
Many chapters have additional material for you to download or watch. Use them to
learn more.
That is all. Go ahead and enjoy this book.
Before you start,
25 Excel Tips
E-book from Chandoo.org
Table of Contents
1. Debugging Formulas using F9 key
2. Display decimal points when number is less than 1
3. Display symbols in Excel charts
4. Use ALT+Enter to get multiple lines in a cell
5. Checking whether a value is between 2 other values
6. Comparing 2 lists Fast & Quick
7. Converting text to sentence case
8. Displaying alert symbols in dashboards
9. How to speed-up formula entry with CTRL+Click
10. Displaying Currency Symbols in Excel
11. Finding 2
Largest value matching a condition
12. VLOOKUP several columns
13. Using picture links
14. Format Multiple Sheets
15. Remove Blank Rows Quickly
16. Format multiple charts
17. Reverse a list of values
18. Modify formulas using find replace
19. Calculate elapsed time
20. Awesome data labels
21. Dynamic charts in 2 minutes
22. Calculate moving average
23. Using 3D references
24. Five awesome mouse tips
25. Filter even or odd rows
26. Bonus: Keyboard shortcuts
25 Excel Tips
E-book from Chandoo.org
Debug formulas using F9 key
Can you imagine building a complex worksheet without formulas? I cant. While no one
can dispute the usability of formulas, we all know how painful it is when an excel
formula returns a mysterious error and we dont know what is causing it.
When I learned IF() formula for the first time, I have spent a whole Sunday morning
debugging a stupid error in a grade calculation formula.
Assuming we have a moderately lengthy formula like this
=IF(AVERAGE(B2:B6)<=AVERAGE(C2:C6),MAX(B2:B6),MAX(C2:C6)) and we want
to know where the error is occurring,
1.Select the cell with formula.
2.Now select the part of formula that you want to evaluate and press F9
3.This will evaluate only the selected part and replaces it with the result.
4.Using this technique you can narrow down the errors to particular range or values
causing it.
5.When you are done, press ESC.
Select the portion of formula
Press F9 to evaluate it
More on Formula Errors ? Discuss this topic
25 Excel Tips
E-book from Chandoo.org
Display decimals when number is less than 1
Here is a quick excel number formatting tip. If you ever want to format numbers in such
a way that it shows decimal values only if the number is less than 1 you can use
conditional custom cell formatting (do not confuse with conditional formatting).
See the example aside.
In such cases you can use conditions in custom cell formatting.
First select the numbers you want to format, hit CTRL+1 (or right mouse click >
format cells)
In the Number tab, select category as custom
Now, write the formatting condition for custom formatting the cell. In our case the
condition looks like [<1]_($#,##0.00_);_($#,##0_). See to the right. what it means is,
if the cell value is less than 1 then format the cell in $#,##0.00 format otherwise
format as $#,##0. Excel cell formatting is a tricky business and if you want to master
it there is no better source than Peltiers article on Custom Number Formats.
More on Custom Cell Formatting ? Discuss this topic
25 Excel Tips
E-book from Chandoo.org
Display symbols in Excel charts
Here is a quick excel tip to make your charts look professional by showing symbols in
the axis labels instead of text.
Just follow these 4 simple steps:
First identify the symbols you want to show on the axis or as data label from
symbol fonts like webdings, wingdings or a custom dingbat font like company logos
Now use this symbol characters as axis labels
Finally change the font to the selected symbol font
Really there is no 4th step, so go ahead add a little jazz to the chart.
More on Axis Labels ? Discuss this topic
25 Excel Tips
E-book from Chandoo.org
Use ALT + Enter to get multiple lines
If you need to type content in a cell and you want to see it in multiple lines then
use alt + enter to break the content in several lines.
See the example on left.
Bonus tip: If you are using formulas to create content in a cell by combining various
text values and you want to introduce line breaks at certain points For eg. you are
creating an address field by combining house number, street name, city and zip code
and you want to introduce line breaks after house number and street name then you
can use CHAR(10). Like this:
=housenumber & CHAR(10) & streetname & CHAR(10) & city & zipcode
Remember when you do this, you need to enable wrap-text feature for that cell from
cell formatting dialog (ctrl+1) to ensure proper display.
More on Formatting ? Discuss this topic
25 Excel Tips
E-book from Chandoo.org
Checking for between conditions
Lets say you have 3 values in A1, A2 and A3. And you want to find out if A1 falls between A2 and A3. Now, the simplest formula for such a thing would be
test whether the conditions A1>=A2, A1<=A3 are both true. Hence, it would look like,
=if(AND(A1>=A2,A1<=A3),"Yes", "No")
However, there are 2 problems with a formula like above: (1) It assumes that A2 is smaller than A3. (2) It is just too big.
Shouldnt there be a shorter and simpler formula?!?
Well, there is. Daniel Ferry, has come up with a darned clever use of MEDIAN formula to test this. It goes like, =if(A1=MEDIAN(A1:A3),"Yes","No")
Now, not only does the above formula look elegant and simple, it also works whether A2 is smaller or larger than A3.
Between Formulas in Excel Summary and Examples:
More on Formulas
? Discuss this topic
25 Excel Tips
E-book from Chandoo.org
Fast & Simple: Compare 2 Lists
A Ridiculously easy and fun way to compare 2 lists
[works only Excel 2007+, use the this technique if you are on excel 2003 or earlier]
1. Select cells in both lists (select first list, then hold CTRL key and then select the
2. Go to Conditional Formatting > Highlight Cells Rules > Duplicate Values
3. Select Duplicate
4. Press ok.
See the screenshots aside to see how this works
(click here for a detailed demo).
More on Conditional Formatting ? Discuss this topic
1 2
25 Excel Tips
E-book from Chandoo.org
Convert Text to Sentence Case
Excel has formulas for converting a bunch of text to UPPER, lower and Proper Cases.
But not a formula to convert o Sentence case. So, in this tip, we will learn a simple
formula tip to convert text to sentence case (ie, First letter capital).
Assuming your text is in C2, the formula is,
How the formula works?
It is converting first letter of C2 to upper case [UPPER(LEFT(C2,1))] and lower case of
rest of C2 [MID(LOWER(C2),2,999)]
The 999 portion is the secret code to unlock ninja features of MID formula.
Well, I am kidding of course, the 999 is just a cop-out to say give me rest of the C2, I
dont know the length of it. (of course, 999 would fail if your text actually has more than
1000 chars. In that case, just use 9999 or whatever large number you fancy.)
Another formula:
PS: As you can guess, the above formulas assume that C2 has one sentence. If C2
has a whole paragraph, then I would really need a sandwich before thinking about that
? Discuss this topic More on Formulas
25 Excel Tips
E-book from Chandoo.org
Use Alerts in Dashboards
Dashboards can be overwhelming with lots of details and context. A simple way to
drag users attention to important stuff in the dashboard is to use alerts. See this
example to understand what alerts mean.
How to display alerts in Excel Dashboards?
The easiest way to display alerts is to use Excel 2007s Conditional Formatting
feature Icon sets.
[Excel 2007+]
Assuming you have a table in dashboard like shown aside
1. Select the alert column
and go to Conditional Formatting > Icon sets
> 3 Traffic Lights (unrimmed)
2. Go to Conditional Formatting > Edit Rules
3. check Icons in reverse order
and Show icons only buttons and
you are done!
For Excel 2003 click here.
More on Dashboards ? Discuss this topic
25 Excel Tips
E-book from Chandoo.org
CTRL+Click speeds up formula entry
Sometimes we think there is very little we can improve in something and then we come
across an idea that would change our perceptions. I have been writing excel formulas
for such a long time that it was easier to remember when I first shaved than when I first
wrote a formula.
I want to present a very interesting functionality in Excel that would save a lot of
time when you are entering formulas in spreadsheets.
If we have 5 cells and we want to CONCATENATE all the text in them to one cell, we
would usually write =CONCATENATE( and then start typing addresses of each cell
one by one.
But there is a faster and simpler way to do this. You can just hold the CTRL key
down and select all the five cells one after another and excel will neatly type the
references for you and include a comma to separate them. You can also use the
same technique for speeding up formula entry for other multi-argument formulas
like VLOOKUP, MATCH etc. Just select the cells corresponding to each parameter in
that order while holding the CTRL key down.
? Discuss this topic More on using Mouse
25 Excel Tips
E-book from Chandoo.org
How to Add Symbols like to Excel?
Often, we need to input special symbols like in to our Excel sheets. Now, how
do we do that?
Simple, Use Insert > Symbol to add several different kinds of symbols.
(see the demo)
5 Bonus tips on using Symbols:
1. You can just double click on the character to insert it. No need to press Insert
2. You can quickly open insert symbol dialog by pressing ALT+I and then S.
(related: 97 keyboard shortcuts to boost your excel mojo)
3. You can use the symbols in formulas too. For eg. you can show ? or ? or ? based
on change of one value wrt to another. Like this:
=if(A1>A2, , if(A1<A2,,))
4. Quickly access symbols to specific to currency, arrows or greek chars by using the
drop-down at top-right.
5. Change the font to Wingdings / Webdings to see some useful and fun characters.
You can spice dashboards or reports with these.
Using Symbols in Charts ? Discuss this topic
25 Excel Tips
E-book from Chandoo.org
Largest Value Matching a Condition
Excel Array Formulas have subtle beauty and raw power. Lets use them to find-out
the 2nd largest sale amount for a particular product.
Lets say you have sales data as shown aside
Now, we all know that, to get 2nd largest sale amount, we can use the LARGE()
formula. Like this: =LARGE(RANGE,2)
But, how do we know what is the 2nd largest sale amount for the product bricks?
This is when an array formula can help you.
Instead of directly giving the SALES_RANGE to LARGE formula, we are asking excel
to include empty spaces wherever product <> Bricks thru the IF() formula inside
When you press CTRL+SHIFT+Enter, excel treats the formula as array formula and
processes the lists of values inside nicely.
? Discuss this topic More on using Mouse
Download Excel Workbook with Examples
25 Excel Tips
E-book from Chandoo.org
Values from Several Columns with VLOOKUP
VLOOKUP is great for extracting information from a huge data table based on what you
are looking for. But what if you need to extract more than one column of information?
For eg. Lets say you have salespersons name in left most column, and monthly sales
figures in next columns, one for each month. Now, you want to find the total sales
made by a given sales person. How do you go about it?
Assuming your data looks like the table aside,
Simple. You can use an array in the column number field of VLOOKUP. So for eg.
=SUM(VLOOKUP(value, list, {2,3,4},false)) will give you sum of values in
columns 2,3 and 4. Of course you must press CTRL+SHIFT+Enter after typing the
formula. See few more examples in the box aside.
More on VLOOKUP Formula ? Discuss this topic Download Excel Workbook with Examples
25 Excel Tips
E-book from Chandoo.org
Using Picture Links in Excel
In this lesson, we will learn a new excel feature, called as Picture links.
Well, picture links are not really new, they are called as camera
snapshots in earlier versions. They provide a live snapshot of a range of
cells to you in an image. So that you can move the image, resize it,
position it wherever you want and when the source cells change, the
picture gets updated, immediately.
What is the use of Picture Links or Camera Snapshots?
Here are few sample uses for picture links:
In dashboards & reports: Usually in dashboards, we need to combine
charts, tables of data, conditional formatting etc., all in one sheet. When
the size of these are not uniform, aligning them on output sheet could be
a huge pain. This is when you can use picture links. First create the
individual portions of dashboard in separate worksheets. Then, embed
picture links to these portions in final dashboard. Re-size them and align
as you see fit.
See this in action: Project management dashboard in excel.
In micro-charts & sparklines: While Excel 2010 has native support for
sparklines and other micro-charts, if you want to create a micro-chart in
earlier versions of excel you have to use trickery. This is where picture
links can help. You can make a regular chart and take a picture link of
that. Then resize the picture so that it fits in to a small area.
See this in action: Micro-charts using camera tool.
In Dynamic Charts: Since picture links are nothing but images with a
formula assigned to them, you can easily construct dynamic charts &
dynamic dashboards using these.
See this in action: Dynamic chart using camera tool, Dynamic
dashboard using camera tool
In shared workbooks: When you share a workbook with a colleague or
boss, a common worry is what if they change formulas or edit something.
This is where picture links can be of great use. You can embed a picture
link of actual data so that no one can edit it.
Contd. in next page,
25 Excel Tips
E-book from Chandoo.org
Using Picture Links in Excel
How to insert a picture link in Excel 3 step tutorial:
To insert a picture link to your data, just follow these 3 steps:
Select the cells. Press CTRL+C
Go to a target cell. From home ribbon select Paste > As picture >
Picture link option (see image below)
That is all. Your picture link is live. Move it or play with it by
changing source cells.
? Discuss this topic More on Picture Links
25 Excel Tips
E-book from Chandoo.org
Format Multiple Sheets by Grouping
Often we come across workbooks that have similar formatting needs for multiple
worksheets. For eg. you may have sales records spanning across 12 worksheets, one
for each month. And you want to keep the formatting of all these worksheets
consistent. So here is a quick tip to begin your work week.
1. Just select all the different sheets (select one, then hold CTRL key and click on
other sheet names).
2. Now format any sheet and similar formatting will be applied to all selected sheets
3. See this demo to understand
The group & format technique is particularly useful when you,
Want to apply same header / footer / print settings to multiple worksheets
Want to write similar formulas in multiple worksheets (for eg. totals)
Turn-off the grouping by selecting any one sheet tab after formatting. Otherwise, any
changes you make will be applied to all sheets.
? Discuss this topic More on Formatting
25 Excel Tips
E-book from Chandoo.org
Remove Blank Rows Quickly
Blank rows or Blank cells is a problem we all inherit one time or another. This is
very common when you try to import data from somewhere else (like a text file or a
CSV file).
Use this procedure to remove blank rows quickly,
Select your data, Press F5
This opens Go to dialog in Excel. Now hit on that select button.
From select special screen, select Blanks (shown aside)
Now, all the blank cells will be selected.
Just press CTRL and Minus sign (-)
Select shift cells up or entire row as needed.
That is all. Now you have successfully removed blank rows.
Bonus tip Keyboard shortcut to remove blank rows:
Press these keys in the same order once you select the cells.
F5 ALT+s k Enter CTRL+ u Enter
Video Tutorial of this ? Discuss this topic
Watch this tutorial on
25 Excel Tips
E-book from Chandoo.org
Format Multiple Charts Quickly
When we have multiple charts, ensuring consistent color schemes, fonts etc. is
very important. Often we individually format the charts because they have different
chart types or source data. But instead, you can just use paste special to copy and
paste chart formatting (formatting of labels, grid line settings, axis settings, colors,
legends, titles) from one chart to another.
See the illustration aside.
To do this, Select the source chart, press Copy (or CTRL+C)
Now select the destination chart, go to Paste Special (or press ALT+ES).
From the dialog select Formats.
? Discuss this topic More on Formatting
Animated Demo
Of This Tip
25 Excel Tips
E-book from Chandoo.org
Reverse a List of Values
Here is a simple yet novel use of formulas.
Let us say you have a list of values in range A1:A5 and you want to reverse the
In an empty cell write =INDEX($A$1:$A$5,COUNTA($A$1:$A$5)-ROWS($A$1:A1)+1)
and copy down. Boom, you get the reversed list.
Here is how the formula works:
In the reversed list, first item is last item in the original list (ie 5th item in our case).
INDEX() formula takes a list, a row number (and optional column number) and
returns the value at intersection.
In this case, $A$1:$A$5 is the list.
5 is the size of list.
ROWS($A$1:A1) gives running numbers from 1 thru 5 when copied in any range of
5 cells. Read more on using ROWS() formula.
More tips on INDEX formula ? Discuss this topic
Excel Workbook
25 Excel Tips
E-book from Chandoo.org
Modify Formulas using Find / Replace
So you have built that spreadsheet report your boss wanted. And you were all eager to use it in your presentation. But in the last minute, your boss asked
you to change average sales to total sales figures (or measure growth wrt to 2006 instead of 2007). You also want to grab an espresso before rushing to the
meeting. Now what?
Simple, skip the coffee.
Of course, I am kidding, who would skip coffee for a bunch of formulas ?
So, we use Find / Replace to do the dirty work while we let the roasted beans restore sanity. Just press Ctrl+` (it is the key next to 1), this will enable
formula view.
Now press Ctrl+H and change the spreadsheet formulas or input range en masse.
You can also use find / replace to change spreadsheet formatting.
? Discuss this topic More on Find Replace
25 Excel Tips
E-book from Chandoo.org
Calculate Elapsed Time
Elapsed time is nothing but interval between a starting point and the current point in
time. We can use excel formulas to calculate elapsed time very easily.
For all the examples in this, the starting date-time is in Cell A1.
Calculating elapsed time in years
=(NOW()-A1)/365 [Help on NOW formula]
Elapsed time in months
=(NOW()-A1)/30. This returns the value in 30 day months.
Elapsed time in weeks
Elapsed time in days
=TODAY()-A1. [Help on TODAY formula]
Elapsed time in working days
To calculate elapsed time in working days, we can use the NETWORKDAYS formula
This formula assumes 5 working days per week starting with Monday.
Elapsed time in hours
Working with Date & Time ? Discuss this topic
Excel Workbook
Refer to download workbook for more examples
25 Excel Tips
E-book from Chandoo.org
Awesome Data Labels
We all know that Chart Data Labels help us highlight important data points.
When you add data labels to a chart series, excel can show either category ,
series or data point values as data labels. But what if you want to have a data
label that is altogether different (see pic. 1).
You can change data labels and point them to different cells using this little trick.
First add data labels to the chart (Layout Ribbon > Data Labels)
Define the new data label values in a bunch of cells (see pic 2).
Now, click on any data label. This will select all data labels. Now click once again.
At this point excel will select only one data label.
Go to Formula bar, press = and point to the cell where the data label for that chart
data point is defined.
Repeat the process for all other data labels, one after another. See the screencast.
Points to note:
This approach works for one data label at a time..
Try Rob Boveys Chart Labeler Excel Add-in. This free tool can automate the whole
custom chart labeling for you.
? Discuss this topic
More on Chart Formatting
Animated Demo
Of This Tip
25 Excel Tips
E-book from Chandoo.org
Create a Dynamic Chart in 2 Minutes
Here is a dead simple way to create a Dynamic Chart in Excel in less than 2 minutes.
First take a look at the dynamic charts in excel demo.
Just follow these 5 steps to create the dynamic chart in excel:
1. Prepare your charts: Make as many charts as you want. Lets say 3.
2. Set up the area where dynamic charts will be loaded: Just take 3 cells in a row
and adjust the row height and column width such that the charts can be fit inside
snugly. Also, type the chart names (1 for each cell) in the cell. Let us say, the charts
you have are for Costs, Sales and Profits, just type these names in the cells.
3. Move and fit charts inside these cells: This should be simple.
4. Finally apply data filter to the cell on top of the 3 cells. Select a filter option and you
will see only that chart.
More on Dynamic Excel Charts ? Discuss this topic
Animated Demo
Of This Tip
25 Excel Tips
E-book from Chandoo.org
Moving average is frequently used to understand underlying trends and helps in
Calculate Moving Average
To calculate moving average, all you need is the good old AVERAGE excel function.
Assuming your data is in the range B1:B12,
Just enter this formula in the cell D3 =AVERAGE(B1:B3)
And now copy the formula from D3 to the range D4 to D12 (since you are calculating
moving average of 3 months, you will only get 10 values; 12-3+1)
Calculate Moving Average of Latest 3 Months Alone
Lets say you need to calculate the average of last 3 months at any point of time.
We are counting the number of months with COUNT(B4:B33) and then getting data for
3 last months using OFFSET(B4,COUNT(B4:B33)-3,0,3,1). Finally we are passing
this range to AVERAGE function to calculate the moving average of latest 3 months.
? Discuss this topic More on OFFSET Formula
Calculate Moving Average
25 Excel Tips
E-book from Chandoo.org
Excel 3D References What are they?
No, dont fetch your 3D glasses. 3D references are your way to refer to same cell in multiple sheets. Confused ? See this illustration:
So we can use 3D references to compute the average of cell D5 across various worksheets. Assuming the sheets are arranged such that we have Shellys
sheet first and Zacks sheet in the end, the formula will look like, =average(Shelly:Zack!D5)
? Discuss this topic
See 3D References in Action
25 Excel Tips
E-book from Chandoo.org
5 Awesome Mouse Tips!
When it comes to productivity, many of us think of keyboard shortcuts. But you can also boost productivity a lot by using mouse. That is right. See this
list of 5 tips.
More Mouse Shortcuts ? Discuss this topic
Watch Animated Demo Of These Tips
Double click on Office button / Logo to close Excel
Adjust column widths & row heights by double clicking on the separators
Double click in the corner, just above scrollbar to include a split
Double click on ribbon menu names to collapse ribbon to get more space
In MS Office 2007 or above you can double click on the ribbon menus to collapse the ribbon to
one line.
Auto-fill a series of cells with data or formulas by just double clicking
I have saved countless minutes ever since I learned this little trick. Lets say you have a table
where in one column you have some data and in the next you have written a formula in the first
row. Now just select the formula in first cell, double click in the bottom right corner and see the
You can create a vertical split by clicking on the little bar shape next to horizontal scroll-bar near
bottom right corner of the excel window.
(If you are wondering where the split would be created, it will be created at selected cells row
(or column))
25 Excel Tips
E-book from Chandoo.org
Sometimes, we may need to filter only even or odd rows, as shown aside. Just follow
the below 5 steps to do this.
1. Add an extra column at the end of your data.
2. Type =ISEVEN(B3) to test whether the number in B3 is even or odd.
3. Drag the formula to fill the entire range.
4. Now filter either TRUE or FALSE values.
5. That is all. You have filtered even or odd rows.
Bonus tips:
You can filter every third row using =MOD(B3,3) and then filtering out all 0s. Help on
MOD formula.
You can highlight alternative rows in different colors using conditional formatting.
Or use Excel Tables to automatically zebra-line (ie shade alternative rows in
different color).
? Discuss this topic More on using Data Filters
Filter Even or Odd Rows Only!
Animated Demo
Of This Tip
25 Excel Tips
E-book from Chandoo.org
25 Bonus Tips Important Shortcuts
Shortcut What it does?
Select the whole column (SHIFT+SPACE for
CTRL + *
Select a continuous range of data, no matter
where your cursor stands in the array
Select all cells that are directly or indirectly
referred to by formulas in the selection
Change the type of cell reference from relative to
absolute or semi-absolute
During non-formula editing mode, Repeats
whatever you did last.
Display range names (can be used when typing
Evaluate formulas. (its easy to remember when
working with some tuf formulas!)
CTRL + ' Copy a formula from above cell and edit
Display the formula palette after you type a valid
function name in a formula
CTRL + `
Alternate between displaying cell values and
displaying cell formulas
Shortcut What it does?
CTRL + [ Select all precedent cells
CTRL + 1 Format Selection (cells, objects, charts)
CTRL + SHIFT + 1 Format as number with 2 decimal points
CTRL + 9 Hide row (CTRL+0 for column)
CTRL + 5 Sets/removes strikeout in current cell
CTRL + SHIFT + 7 Single border around selected cells
CTRL + K Insert hyperlink
ALT + WFF Freeze panes
ALT + HW (2007+) To wrap lines
F12 Save as
CTRL + F1 Collapse the ribbon (press again to expand)
ALT + DFS Keep filter on columns, but show all rows
CTRL + SHIFT + L Turn filter on or off
ALT + ESV Paste values only
F5 + ALT + SK,
Select blank cells
97 More Keyboard Shortcuts
25 Excel Tips
E-book from Chandoo.org
Hi dear,
Thank you for picking up 25 Excel Tips e-book from Chandoo.org. Clearly, you are
intelligent and eager to learn. I bet you are kind, passionate and help others too.
Now that you have finished reading this book, I have a small favor to ask: Can you share
this book? Please email this book to a colleague or friend. I am sure they deserve to be
as awesome as you are.
Other ways to share:
Send them to this page http://chandoo.org/wp/special-gift/
Post about this book on Facebook
Share with your friends via Twitter
Can I ask you a favor?