Would you like to learn most popular Excel tips and shortcuts?
100 Excel & Charting Tips, Tricks and Resources for you.
These 100 tips & resources are organized in to the areas,
- Keyboard Shortcuts
- Formulas
- Using Excel to do more
- Charting
- Excel Books for everyone
- Excel Blogs & Resources
All these tips are bite sized and easy to read, digest and implement. The focus is on improving your productivity and making your day better. Wherever possible, I have included links to relevant articles on this site so that you can read and learn more.
If you like this post, I encourage you to signup for my free email newsletter.
Ok, on to the tips now…
25 Very Useful Keyboard Shortcuts
1. To format any selected object, press ctrl+1
2. To insert current date, press ctrl+;
3. To insert current time, press ctrl+shift+;
4. To repeat last action, press F4
5. To edit a cell comment, press shift + F2
6. To autosum selected cells, press alt + =
7. To see the suggest drop-down in a cell, press alt + down arrow
8. To enter multiple lines in a cell, press alt+enter
9. To insert a new sheet, press shift + F11
10. To edit active cell, press F2 (places cursor in the end)
11. To hide current row, press ctrl+9
12. To hide current column, press ctrl+0
13. To unhide rows in selected range, press ctrl+shift+9
14. To unhide columns in selected range, press ctrl+shift+0
15. To recalculate formulas, press F9
16. To select data in current region, press ctrl+shift+8
17. To see formulas in the worksheet, press ctrl+`
18. While editing formulas to change the reference type from absolute to relative vice versa, press F4
19. To format a number as currency, press ctrl+shift+4 (ctrl+$)
20. To apply outline border around selected cells, press ctrl+shift+7
21. To open the macros dialog box, press alt+F8
22. To copy value from above cell, press ctrl+’
23. To format current cell with comma formats, press ctrl+shift+1
24. To go to the next worksheet, press ctrl+shift+pg down
25. To go to the previous worksheet, press ctrl+shift+pg up
20 Situations and How to Solve them using Excel Formulas
26. To get the first name of a person, use =left(name,find(” “,name)-1)
27. To calculate mortgage payments, use =PMT(interest-rate,number-of-payments,how-much-loan)
28. To get nth largest number in a range, use =large(range,n)… Get Full Tip
29. To get nth smallest number in a range, use = small(range,n)… Get Full Tip
30. To generate a random phone number, use =randbetween(1000000000,9999999999), needs analysis toolpak if you are using excel 2003 or earlier… Get Full Tip
31. To count number of words in a cell, use =len(trim(text))-len(SUBSTITUTE(trim(text),” “,””))… Get Full Tip
32. To count positive values in a range, use =countif(range,”>0″)… Get Full Tip
33. To calculate weighted average, use SUMPRODUCT() function
34. To remove unnecessary spaces, use =trim(text)
35. To format a number as SSN using formulas, use =text(ssn-text,”000-00-0000″)… Get Full Tip
36. To find age of a person based on DOB, use =TEXT((NOW()-birth_date)&””,”yy “”years”” m “”months”” dd “”days”””), output will be like 27 years 7 months 29 days
37. To get name from initials from a name, use IF(), FIND(), LEN() and SUBSTITUTE() formulas… Get Full Tip
38. To get proper fraction from a number (for eg 1/3 from 6/18), use =text(fraction, “?/?”)
39. To get partial matches in vlookup, use * operator like this: =vlookup(“abc*”,lookup_range,return_column)
40. To simulate averageif() in earlier versions of excel, use =sumif(range, criteria)/countif(range, criteria)
41. To debug your formulas, select the portions of formula and press F9 to see the result of that portion… Get Full Tip
42. To get the file extension from a file name, use =right(filename,3) (doesn’t work for files that have weird extensions like .docx, .htaccess etc.)
43. To quickly insert an in cell micro-chart, use REPT() function… Get Full Tip
44. COUNT() only counts number of cells with numbers in them, if you want to count number of cells with anything in them, use COUNTA()
45. Using named ranges in formulas saves you a lot of time. To define one, just select some cells, and go to menu > insert > named ranges > define
15 Excel Tips on Improving Productivity Using Excel
46. To format a number as SSN, use the custom format code “000-00-0000″… Get Full Tip
47. To format a phone number, use the custom format code “000-000-0000″… Get Full Tip
48. To show values after decimal point only when number is less than one, use [<1]_($#,##0.00_);_($#,##0_) as formatting code… Get Full Tip
49. To remove grid lines from excel worksheet, go to menu > tools > options > and un-check grid lines option. (Excel 2007: office button > excel option > advanced)… Get Full Tip
50. To hide a worksheet, go to menu > format > sheet > hide… Get Full Tip
51. To align multiple objects, like charts, drawings, pictures use drawing toolbar > align and select alignment option… Get Full Tip
52. To freeze rows on top, select the a row and use menu > window > freeze panes… Get Full Tip
53. To disable annoying formula errors, go to menu > tools > options > error checking tab and disable errors you don’t want to see… Get Full Tip
54. To change the shape of cell comments from rectangle to some other symbol, select the comment, go to drawing tool bar and change the shape from there… Get Full Tip
55. To transpose a range of cells, copy the cells, go to empty area, and press alt+e+s+e… Get Full Tip
56. To save data filter settings so that you can reuse them again, use custom views… Get Full Tip
57. To select all formulas, press CTRL+G, select “special” and check “formulas”
58. To select all constants, press CTRL+G, select “special” and check “constants”
59. To clear formats from a range, select menu > edit > clear > “formats”
60. To move a chart and align it with cells, hold down ALT key while moving the chart
9 Charting Tips for Everyone
61. To create an instant micro-chart from your data, use sparklines… Get Full Tip
62. Understand data to ink ratio to reduce chart junk, using even a pixel more of ink than what is needed can reduce your chart’s effectiveness
63. Combine two different types of charts when one is not enough, to use, add another series of data to your sheet and then right click on it and change the chart type… Get Full Tip
64. To reverse the order of items in a bar / column chart, just click on y-axis, press ctrl+1, and check “categories in reverse order” and “x-axis crosses at maximum category” options
65. To change the marker symbol or bubble in a chart to your own favorite shape, just draw any shape in worksheet using drawing toolbar, then copy it by pressing ctrl+c, now go to the chart and select markers (or bubbles) and press ctrl+v
66. To create partially overlapped column / bar charts, just use overlap and gap settings in the format data series area. A overlap of 100 will completely overlap one series on another, while 0 separates them completely.… Get Full Tip
67. To increase the contrast of your chart, just remove grayish background color that excel adds to the chart (in versions excel 2003 and prior)
68. To save yourself some trouble, always try to avoid charts like – 3D area charts (unstacked), radar charts, 3D Lines, 3D Columns with multiple series of data, Donut charts with more than 2 series of data… Get Full Tip
69. To improve comparison, replace your radar charts with tables… Get Full Tip
6 simple steps for better chart formats
70. Remove any vertical grid-lines
71. Change horizontal grid-line color from black to a very light shade of gray
72. Adjust chart series colors to get better contrast
73. Adjust font scaling (for versions excel 2003 and prior)
74. Add data labels and remove any axis (axis labels) if needed
75. Remove chart background colors
5 Excel books for everyone
76. Excel 2016 Bible by John Walkenbach
77. Excel 2016 Power Programming by John Walkenbach
78. Excel 2016 All in one for dummies by Greg Harvey
79. Microsoft Excel Data Analysis and Business Modelling by Wayne Winston
80. M is for Data Monkey by Ken Puls
PS: Links to Amazon, affiliate code used
20 Excellent Resources and Blogs for getting latest Excel Tips & Charting Ideas
81. PTS Blog
82. Andrew’s Excel Tips
83. Microsoft Power BI Blog
84. Contextures
85. Junk Charts
86. Daily Dose of Excel
87. Digital Inspiration
88. Life Hacker
89. Jorge’s Charts Blog
90. Data Chant
91. Excelarator BI
92. Guy in a Cube
93. More information per pixel
94. Newton Excel Bach
95. Presentation Zen
96. Visual Business Intelligence by Stephen Few
97. Spreadsheet Journalism
98. Allen Wyatt’s Excel Tips
99. Excel Guru
100. Chandoo.org on YouTube
Join the celebrations, share your tips & ideas
I encourage you to share your Excel Tips & Charting Suggestions through comments section. We have a vibrant reader community here and we love to learn from each other.
If you like this post, I encourage you to signup for my free Email Newsletter
Post updated on 20-May-2018














54 Responses to “6 Tips for Writing Better VLOOKUPs”
Hi, I am loving the VLOOKUP series this week. 🙂
Could you please expand a little on why you don't recommend using 1 or 0 in place of true or false? I am in the habit of doing this.
"You can even omit the last argument if it is 0"
Excel's default for the last argument is TRUE. Because of this, it's dangerous to omit the last arguement. I would use either FALSE or 0. Never omit if you want an exact match.
Nice series, Chandoo!
.
Your readers may be interested to know that the quickest formula method to do lookups in Excel is an array-entered INDEX.
.
This is one of the many topics covered in the Excel Hero Academy:
Excel Hero Academy
.
Regards,
Daniel Ferry
Excel Hero Academy
Dear Daniel,
I had used index-match with absolute reference for the ranges but when I am resorting the table the formula is not recalulating the lookup value combination.
Regards,
Anish Menacherry
@Anish
Can you post the question at the Chandoo.org Forums
http://chandoo.org/forum/
Please include a sample file so we can review the issue
1. Never use VLOOKUP/HLOOKUP - Always use Match /Index
2. Sort your data before performing a Loookup
3. Use 1/-1 option Match as it is at least 10 times faster than the 0 option- But modified to perform an exact match rather than an approximate match as described below
a) A Column containing a Match Fucntion to Find the Position with the 1/-1 option
b) A Status column containing a Index to check the status (present/not present)
c) Multiple array entered Index colums to pick
In tip number 5 you state, "you can even omit the last argument if it is 0" which is not correct. If you omit the last argument, Range_Lookup, is TRUE, as Mike Alexander points out.
Excellent series - Need some help from the expert. how easy it is to add/expand a named range in a lookup formula?
@Mike & Gregory: I am sorry for the confusion. The formula =VLOOKUP(value, range, column #) assumes last argument as TRUE.
Where as the formula =VLOOKUP(value, range, column #, ) assumes last argument is blank or empty which internally gets treated as 0.
And that is what I mean by you can even omit last argument. I state that "Remember, you must place a comma (,) after the column number if you are planning to use this." otherwise, this will not work.
@Andrew: I suggest not using 0 or 1 as they are more cryptic and lead to confusion when your spreadsheet gets to someone else's hands.
@Daniel: Thanks for that.
@Sam: Good tips. I would just add that using VLOOKUP / HLOOKUP is ok as long as they solve the problem you have and do not take too much time. The performance improvements you get with array entered index or other techniques are minimal when dealing with small and moderately sized data sets.
@Sundeep
Very easy
Have a read of: http://chandoo.org/wp/2009/10/15/dynamic-chart-data-series/
Particularly Point 3. Create a new named range and type OFFSET formula
@Hui - Thanks.
If I have a large workbook with many Vlookups and if I change the range to named range...is there an easy way to change all the formulas? It is more of wishful thinking than a question 🙂
@Sundeep... You can use Apply names from formulas ribbon to apply names to a selected range. This technique works when the ranges are mapped to static references. Dynamic refs. thru OFFSET are bit more tricky.
You can use the find / replace to automatically replace all $A$1:$C$1000 with dynamic range lstData. See this: http://chandoo.org/wp/2009/02/17/spreadsheet-formulas-edit/
@Sundeep
On the Formulas Tab, Click on the Drop Down on the Define Name button and select Apply Names
Select one or all Named Ranges and apply
Excel will go through your worksheet/s and change the Ranges for Named Ranges.
i cannot believe i missed the new to 2007 formula "IFERROR". your mention of this will help reduce the number of characters in many formulars i use (with "ISERROR") by at least 40% along with commensurate reductions in spreadsheet size and calculation speed... not to mention future reduction in typing and debugging time in formulas. thank you. and thank excel.
Newbie here.
I am not able to understand the Tip#1. Use of "val", "tbl". I tried and it kept on giving error.
Chandoo's Tip#1: =VLOOKUP(valSalesPerson,tblData,3,FALSE)
Does it need column headings? And how do you l lookup the value I am looking.
Thanks in advance.
[...] 6 VLOOKUP Tips [...]
[...] VLOOKUP, INDEX, and MATCH: Useful for looking up any text values [...]
I need some help with creating a formula. I have a list of names on tab 1. (About 20) On tab 2 I have a list of names and there total sales (About 3,500) I created a name range for both the first list of names on tab 1 (Producer) and a name range for the second list on tab 2 (Agent_List) The sales on tab 2 for each producer is in the 7th colume.
I need the formula to identify name of Producer (Tab1) from the Agent_List and then choose the total sales for that producer.
This is the formula I put together and I only get #REF!
VLOOKUP(PRODUCER,AGENT_LIST,7,FALSE)
@JimH
I assume you are adding a column next to the Agent_List on Tab 2 and looking up values from the Agent_List and retrieving values from the Producer list
.
So the format for your equation will be:
=VLOOKUP(A2,Producer,7,FALSE)
or
=VLOOKUP(Agent_List,Producer,7,FALSE)
.
Note that the named range Producer must be at least 7 columns wide, not just Column A or you will get the #REF! error also
Hi
Can anyone please help or this totally impossible in excel? I am trying to do a vlookup with a range of cells that contains "comments" in them and unsuccessful.
Thank you
@Lala
You cannot search within comments unless you use VBA
My tips are:
Pay attention to data types - no fly if mixing text and numbers. I run into this problem a lot with files downloaded from access that have a tendency to mix data types on me when it hits excel.
Pay attention to $ - If pulling from the same workbook, $ won't auto fill on your range and you will potentially miss hits.
Yeah, the data type mixing has bitten several folks I work with in the rear.
EG: I work at a company where marketing source codes are 10-alphanumeric. But, some codes are like "12345" while others are "123abc". When access or sql dumps to excel, the numerical ones convert to numbers while the text ones stay text.
So, what I do is create a reference column next to them in which I do a =TRIM([column]). Trim not only removes front/back spaces, it converts a value to text data type. This is useful, b/c sometimes sql db admins will store data with a fixed string length (eg: a column may get stored as char(50), which means it will have 50 chars no matter if it has to add extra spaces at the end to pad it out.) When you dump this to excel, the extra spaces remain at the end. So, the Trim command not only converts numbers to text, it removes padded spaces at the end. Very useful when working with sql dumps.
I have two sheets, in first sheet i have given a criteria of month (like jan, feb), then on another sheet i have month wise sheet like
jan feb mar
a 2 5 8
b 5 9 8
c 9 12 89
now i need in first sheet if i give criteria jan then answer is 2+5+9, or if i give feb then answer is 5+9+12 and like that, how to get that??
I am pretty well versed in VLOOKUP but I have a challenge I can't figure out. When I complete the VLOOKUP in one cell, it works fine. When I drag the formula down (using $ where necessary) the value from the first LOOKUP populates in the new cell. If I double click on the cell and hit 'enter' then the correct value is pulled in from the vlookup. Any suggestions why the formula isn't executing correctly until I hit enter?
@Nicole
It sounds like Calculation is set to Manual
Goto the Data Tab Calculation and set it to Automatic
Absolutely FANTASTIC!! Thank you so much. Slight variation on my version of Excel. I had to go to Formulas Tab then to Calculation sub-tab, Calculation Options, change setting to Automatic. Thank you thank you thank you. Saved me hours of more frustration!
[...] than maybe sorted, which it usually is anyway).Use COUNTIF or MATCH to speed up calculationAs many others have pointed out, VLOOKUP returns #N/A if the lookup value is not found. Instead of using a [...]
I have more than 2 columns in a table I'm so confused cuz the results i get is #N/A =(
I have a 2-sheet database. Sheet 2 has a list of Accronyms in column A and their description in column B. On sheet 1, column A is where you input your Acronym. In column B, the formula takes Acronym from column A, looks it up on sheet 2, and displays it on column B.
After some research, I found how to make custom text if there is not a match on the Acromyn. The question i have is, is that when there is no text in comumn A, sheet 1, column B, sheet 1 displays my custom text "ABBREVIATION NOT FOUND". I'm trying to write a forumla that leaves column B blank unitl there is an input in column A.
This is my current forulma:
=IF(ISNA(VLOOKUP(A4,Description!A:B,2,FALSE)),"ABBREVIATION NOT FOUND",(VLOOKUP(A4,Description!A:B,2,FALSE)))
Any help out there?
Thanks,
Jerome
Hi Jerome... Thanks for your question. Try this formula instead:
=IF(A4<>"", IFERROR(VLOOKUP(A4,Description!A:B,2,FALSE),”ABBREVIATION NOT FOUND”), "")
Works in XL 2007 or above. For older versions use this:
=IF(A4<>"", IF(ISNA(VLOOKUP(A4,Description!A:B,2,FALSE)),”ABBREVIATION NOT FOUND”,(VLOOKUP(A4,Description!A:B,2,FALSE))), "")
Btw, to learn more about IFERROR see this: http://chandoo.org/wp/2011/03/11/iferror-formula/
I have 2 worksheet, the first one is like this:
A B C D
1 DOG 1 BROWN
1 DOG 2 WHITE
2 CAT 1 SMALL
2 CAT 2 MEDIUM
2 CAT 3 BIG
THE SECOND WORKSHEET IS LIKE THIS:
A B C D
ENTER# fORMULA 1 WITH VLOOK ENTER # FORMULA 2
(RETURN ANIMAL) RETURN TYPE
FOR EXAMPLE i NEED WORKS LIKE THIS:
2 CAT 2 MEDIUM
FIRST FORMULA IS EASY NOT PROBLEM. bUT FOR THE SECOND i DO NOT FIND HOW TO DO IT. PLEASE HELP.
This would be how I would handle your second formula, in your first worksheet, I would insert a column between C & D. In that column I would have a formula to concatenate the values in column A & C (example =concatenate(a2,c2)) which would result in:
A B C D E
1 DOG 1 11 BROWN
1 DOG 2 12 WHITE
2 CAT 1 21 SMALL
2 CAT 2 22 MEDIUM
2 CAT 3 23 BIG
Then in the second worksheet formula 2 would be:
=vlookup(concatenate($a2,$c2),AnimalType columns D&E,2,false)
Great Stuff Chandoo
In your 6th post you say use SUMIF instead of VLOOKUP as it runs faster.
What if you have a spread sheet with repeated data and you only want to pull one value back?
would it be best to use a simple VLOOKUP
or something like: IF(COUNTIF < 2, SUMIF, VLOOKUP)
I have set COUNTIF < 2 (not just = 1) to take advantage of the fact that if COUNTIF = 0 you won’t get an error
Now if only you could use the column header name instead of the column index number in the VLOOKUP function.
Scenario: I have a list/table in one spreadsheet that I use to lookup values in other spreadsheets. If I insert columns in my list/table, I have to go into the other spreadsheet(s) and increment the VLOOKUP formulas' column index number to capture the right column of values.
Example: if I inserted a column in Table1, my formula:
=VLOOKUP(A1,Table1,2,FALSE) would have to change to:
=VLOOKUP(A1,Table1,3,FALSE),
it would be so much better if you could code something like:
=VLOOKUP(A1,Table1,Table1[price],FALSE)
If my lookup result is numeric data I could use sumif as suggested and use the list/table references; is there a similar function I can use for alphanumeric data lookups that uses list/table references?
[…] Read more – 6 VLOOKUP tips […]
tip:
you can use dynamic column reference for your look up if you want to pull multiple column values from another sheet with the same row reference without having to rewrite the the formula, e.g.
range a1:d1 = "header", 2 , 3, 4
b2 = vlookup($a2, LookUpRange, b$2, 0)
c2 = vlookup($a2, LookUpRange, c$2, 0)
b3 = vlookup($a3, LookUpRange, b$2, 0)
the above will bring back the value two columns away from LookUpRange in b2, 3 for c2 and 4 for d2 for the same reference, a2. By freezing just the column for your lookup reference value and just the rows for your column reference, you can drag your forums both down and right while keeping all reference both constant and dynamic... as oxymoronic as that sounds.
my TIP, building on what Andy says above re using a dynamic refrence: if you use the column functon in the header row - should someone add extra columns to the source sheet your lookup will adapt and still return the right result.
With the below formula I am getting "too many arguments for this function. any help?
=IFERROR(VLOOKUP(RIGHT(M3,7),notes!A:A,1,FALSE),"Failure to process correctly",IFERROR(VLOOKUP(RIGHT(n,2),notes!A:A,1,FALSE),"Failure to process correctly"))
Chaz - IFERROR only requires 2 arguments, you have entered 3 (the vlookup, the error message, the 2nd IFERROR).
Change your formula to the following:
=IF(isERROR(VLOOKUP(RIGHT(M3,7),notes!A:A,1,FALSE)),”Failure to process correctly”,IFERROR(VLOOKUP(RIGHT(n,2),notes!A:A,1,FALSE),”Failure to process correctly”))
Ian
Hmm, I'm not sure my formula will return the required output.
This tests if there is an error in the 1st vlookup, then checks the 2nd, and only returns the error message if both vlookups are errors. Is that what you wanted to do?
=IF(isERROR(VLOOKUP(RIGHT(M3,7),notes!A:A,1,FALSE)),IFERROR(VLOOKUP(RIGHT(n,2),notes!A:A,1,FALSE),”Failure to process correctly”),VLOOKUP(RIGHT(M3,7),notes!A:A,1,FALSE))
I am trying to use a vlookup with a named range for the lookup array. This works fine. However now I would like to replace this named range with a cell reference (which obviously contains the name of the named range) but get a N/A error message. Is this really not possible?
vlookup ( A1, named range, 2, 0 ) . This works
vlookup ( A1, F1, 2, 0 ) . Where cell F1 contains the the text with named range. This does not work.
Any tips or thoughts would be appreciated. Thank you in advance
@Erik
Use: vlookup ( A1, Indirect(F1), 2, 0 )
Works like a charm. Thank you!
Some opinions on the pros and cons of using named ranges on http://www.excelvlookuphelp.com along with a few other hot tips
Hello,
Chandoo,
Can u explain me how to use vlookup formula in 2 sheets in one excel workbook.
Hi am Using Index match function to overcome the limitation of Vlookup. But I am failed to get the same result as i get in Vlookup. in vlookup as we can expand the Columns of Vlookup in one single shot. Like Vlookup($A4,A1:G9,3,0) but same Result i Not get in Index match Function. Please help
@Satish
I will suggest that your list is unsorted and it is possible that VLookup is returning a wrong answer
Can you post a question at the Chandoo.org Forums
http://chandoo.org/forum/
Post a sample file and someone will review
I want to upload a Sample file Contain my Question. but i can't see and upload file button on the page. Please Tell how to upload the File
@Satish
You can't upload a file here
But you can on the Forums
Goto:
http://chandoo.org/forum/
Select a Forum
Start a New Thread
Upload a File, is at the Bottom next to the Post Button
Refer: http://chandoo.org/forum/threads/posting-a-sample-workbook.451/#post-73705
thanxx... Soon i will Upload It.
Dear Excel super-users,
Sourcing data from different sheets.
I'd like to specify in the vlookup formula which sheet to source data from.
This source sheet will change depending of the name of the person selected in a specific cell C1 on the sheet where the vlookup formula is being run from.
I'd be grateful for any tips to achieve this.
Regards,
Sean
dear sir /madam
please proved me lookup formula
and exp--------- insert picture formula attched excel sheet
Us the Column formula in place of the 3rd argument will save you time when you want to bring in all data columns!