Vlooklup to show a blank if not found

psrs0810

Well-known Member
Joined
Apr 14, 2009
Messages
1,109
I have used this formula before and it has worked in the past. Why now would it show my returned value a 0 if nothing is there?

=IF(ISNA(VLOOKUP(A1,Sheet1!C:E,3,0)),"",VLOOKUP(A1,Sheet1!C:E,3,0))
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
=IF(ISNA(VLOOKUP(A1,Sheet1!C:E,3,0)),"",VLOOKUP(A1,Sheet1!C:E,3,0))

The IF(ISNA Structure used here will return a "" if A1 is NOT found in Sheet1 Column C.
Therefore the ISNA captures it because the VLOOKUP is an error.

However, If A1 IS found in Sheet1 Column C (say it's in C20),
BUT the corresponding Value in Column E (E20) is Blank
Then the ISNA doesn't capture it, because the VLOOKUP is NOT an error
It's returning the value in E20 (blank).

So just like =A1 will return 0 if A1 is blank,
So will a vlookup.


Hope that explains it.
 
Upvote 0
Are you sure the value of cell A1 is not found in column C?

Do a COUNTIF to be sure, for instance. It should give a result of 0.
 
Upvote 0
What type of data is expeted to be returned from the vlookup?
Number or Text?
 
Upvote 0
number.

is this formula doing the same thing?
=IFERROR(VLOOKUP(A1,Sheet1!C:E,3,0),"")

Yes, it's the same as your IF(ISNA structure.
But the IFERROR is only available in XL2007 or higher.
was not available in XL2003
 
Upvote 0

Forum statistics

Threads
1,224,551
Messages
6,179,480
Members
452,915
Latest member
hannnahheileen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top