Excel.Tips.Net ExcelTips (Menu Interface)

Returning Blanks with VLOOKUP

Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Returning Blanks with VLOOKUP.

When you use VLOOKUP to return a value from a data table, the function does not differentiate between blanks and zero values in what it returns. If the source value is zero, then VLOOKUP returns 0. Likewise, if the source is blank, then VLOOKUP still returns the value 0. For some purposes, this may not do—you need to know whether the cell being looked up is blank or if it really contains a 0.

There are many different solutions that could be pursued. One solution relies on the fact that even though VLOOKUP returns a 0, it will correctly report the length of the source cell. Thus, if you use the LEN function on what is returned, if the source cell is empty the LEN function returns 0, but if the source contains a 0 then LEN returns 1 (the 0 value is 1 character in length). This means that you could use the following formula in place of a standard VLOOKUP:


In this case if the length of what VLOOKUP returns is 0, then Excel doesn't actually do a lookup—it forces a blank to be returned. Only if the length is not 0 is the actual VLOOKUP performed.

There are other variations on this same concept, each testing a different characteristic of the data being referenced and then making the decision as to whether to actually look up that data. This variation, for example, directly tests to see if the source is blank:


The formula can also be modified to check the source cell for multiple conditions. For instance, this variation returns a blank if the source is blank or if the source contains an #N/A error:


ExcelTips is your source for cost-effective Microsoft Excel training. This tip (3075) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Returning Blanks with VLOOKUP.

Related Tips:

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!


Leave your own comment:

  Notify me about new comments ONLY FOR THIS TIP
Notify me about new comments ANYWHERE ON THIS SITE
Hide my email address
*What is 5+3 (To prevent automated submissions and spam.)
           Commenting Terms

Comments for this tip:

Jon    14 Oct 2016, 18:25
I am trying to make a data sheet that pulls dates from another sheet. When the other tab has no date in it i want it to stay blank and not put 1/1/1900. This is the formula i have now.

=VLOOKUP(A7,'Student Management'!A:G,5,FALSE)
Michael (Micky) Avidan    18 Aug 2016, 06:33
Would you be so king to explain what difference did you find and/or for what reason did you present your formula A FULL WEEK(!) after my suggestion ?


I do hope you wont suggest =B1+A1 after someone else have suggested: =A1+B1 (Believe me it is a bad habit)

Michael (Micky) Avidan
“Microsoft® Answers" - Wiki author & Forums Moderator
“Microsoft®” MVP – Excel (2009-2016)
Colton    17 Aug 2016, 17:49
Javi, would you mind explaining the logic behind why that works?

Ashley Soon    26 May 2016, 06:45
Thanks to Javi! His suggestion worked!
javi    19 May 2016, 11:39
a way working for me is


Michael (Micky) Avidan    12 Apr 2016, 08:11
@Bob Hartmann,
To the best of my experience - you can use: =VLOOKUP(B1,D:E,2,)&""
for any returned value (Numeric or Text) except DATE.
For dates I, usually, use:
*** The IFERROR suits all Excel version since "2007".
For earlier versions use:
Michael (Micky) Avidan
“Microsoft® Answers" - Wiki author & Forums Moderator
“Microsoft®” MVP – Excel (2009-2016)
Bob Hartmann    11 Apr 2016, 13:26
I have used the "IF" variant for a long time. However, after looking at this tip, the fact that VLOOKUP returns a zero length for a blank cell gave me a new idea. If you are expecting a TEXT (string) value to be returned by the VLOOKUP, you can use CONCATENATE(VLOOKUP(...),"") to eliminate the zeros. Also, if you expect a numeric value and you don't care about zero values, just format the cells with a format like <positive format>;<negative format>;<empty>. This will also turn the zeros to blanks.
Jack    07 Mar 2016, 16:57
Have an issue with a blank cell. Example: C2 have to enter data, D2 contains following VLOOKUP ( =VLOOKUP(C2;'Sounding Tables'!$A$9:$E$361;3;FALSE)), cell E2 (=D2-D1). I am trying to work with "IF" in order keep cell E2 blank when cell C2 has no data entered or blank.
Somebody an idea to help me out?
Thanks in advance.
Greg Mayer    04 Feb 2016, 14:21
Very Helpful Page of information.
Ryan    01 Sep 2015, 21:30
Thank you for posting this help page!!
samuel    15 Jul 2015, 06:51

I need to find the first blank cell above specified one how can I make this without entering VBA

Thanks a lot
carlos    26 Jun 2015, 17:36
currently my formula is:

I'm receiving N/A's due to blanks in my column C. I think i'm confused as to how i'd create my formula to leave me blanks. CAn anyone please assist me with the formula i have above? Help anyone?
Amol    23 Apr 2015, 01:19
& needless to mention this is blilliance.....
Amol    23 Apr 2015, 01:07
Heartiest thanks mate & god bless you...!
Nadeen    14 Apr 2015, 07:44
Huge thank you brilliant!
blake    19 Feb 2015, 12:57
John Wu - that's brilliant, and means there is only 1 VLOOKUP performed, no matter what!
TERRY MILLAR    29 Dec 2014, 19:31
As usual, the tips worked miracles. Thank you!!!
Modern excel    18 Dec 2014, 14:17
Starting excel 2007 and on you can use =IFERROR(whatever,"") to get a blank in place of #NA and others. Enjoy
Excel want to be wizard    03 Dec 2014, 06:21
Like that idea John Wu thanks
Luke Stevens    26 Jun 2014, 00:08
Only if the length is not 0 is the actual VLOOKUP performed.

Surely this isn't right! Excel has to do one lookup to establish whether the looked up value is blank or not. If it isn't, won't Excel do the lookup again to return the value?

So Excel will do either 1 lookup or 2, not 0 or 1.

Maybe Excel is clever enough to cache somehow the result of the first lookup to reuse for the false condition of the if. Maybe it isn't...
Jacky    15 Jan 2014, 23:24
Re john, brilliant!
John Wu    10 Sep 2013, 09:44
I will use the formula =VLOOKUP(B1,D:E,2,0) & "" to handle the blank value issue
Grumpy Excel User    26 Jun 2013, 19:32
Munish Kumar. Ask nicely.
new excel learner    26 Apr 2013, 11:07
Thanks the =IF(VLOOKUP(B1,D:E,2)="","",VLOOKUP(B1,D:E,2))
 was very useful
Munish Kumar    30 Mar 2013, 04:04
Kindly send us excel formula (if and len).

Our Company

Sharon Parq Associates, Inc.

About Tips.Net

Contact Us


Advertise with Us

Our Privacy Policy

Our Sites


Beauty and Style




DriveTips (Google Drive)

ExcelTips (Excel 97–2003)

ExcelTips (Excel 2007–2016)



Home Improvement

Money and Finances


Pests and Bugs

Pets and Animals

WindowsTips (Microsoft Windows)

WordTips (Word 97–2003)

WordTips (Word 2007–2016)

Our Products

Helpful E-books

Newsletter Archives


Excel Products

Word Products

Our Authors

Author Index

Write for Tips.Net

Copyright © 2016 Sharon Parq Associates, Inc.