Vlookup returning a blank cell

dhally

Board Regular
Joined
May 9, 2011
Messages
58
Hello;
I have viewed numerous threads regarding: Vlookup returning a blank cell if is lookup returns #NA.

Yet, when I use the the accepted formula format given on many different websites I get a return of a number zero when I really want a return of a blank cell. Here is my original Vlookup formula:
=VLOOKUP(A300,'VLOOKUP_FOR_BLANK_RANTALA_Request For SAP Upload Form.xlsx'!LookupContainer,12,FALSE)

Here is the formula I had hoped would return a blank cell:
=IF(ISNA(VLOOKUP(A301,'VLOOKUP CONTAINER'!K301:L301,2)),"",(VLOOKUP(A301,'VLOOKUP CONTAINER'!K301:L301,2))

Any help would be very appreciated. Thank you in advance
dh
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Let me try what you just posted: =IFERROR(T(VLOOKUP(...)),"")
If this is your data...

Book1
AB
1NameRegion
2Name1North
3Name2East
4Name3South
5Name4
6Name5West
7Name6East
8Name7South
9Name8North
10Name9North
Sheet2

=IFERROR(T(VLOOKUP("name4",A1:B10,2,0)),"")

Returns blank

=IFERROR(T(VLOOKUP("name100",A1:B10,2,0)),"")

Returns blank

=IFERROR(T(VLOOKUP("name3",A1:B10,2,0)),"")

Returns South
 
Upvote 0
T. Valko,

This formula:
=IF(ISNA(VLOOKUP(A301,'VLOOKUP CONTAINER'!K301:L301,2)),"",IF(VLOOKUP(A301,'VLOOKUP CONTAINER'!K301:L301,2)=0,"",VLOOKUP(A301,'VLOOKUP CONTAINER'!K301:L301,2)))

returned a blank cell which was what I was looking for. It seems I left out the middle IF formula syntax as underlined.

Thank you so much!
dh
 
Upvote 0
T. Valko,

This formula:
=IF(ISNA(VLOOKUP(A301,'VLOOKUP CONTAINER'!K301:L301,2)),"",IF(VLOOKUP(A301,'VLOOKUP CONTAINER'!K301:L301,2)=0,"",VLOOKUP(A301,'VLOOKUP CONTAINER'!K301:L301,2)))

returned a blank cell which was what I was looking for. It seems I left out the middle IF formula syntax as underlined.

Thank you so much!
dh
What type of data is that formula returning? Is it text or is it numeric or could it be both?
 
Upvote 0
This formula: =IF(ISNA(VLOOKUP(A301,'VLOOKUP CONTAINER'!K301:L301,2)),"",IF(VLOOKUP(A301,'VLOOKUP CONTAINER'!K301:L301,2)=0,"",VLOOKUP(A301,'VLOOKUP CONTAINER'!K301:L301,2)))

returns a blank cell. I tested the cell (k301) on by typing the value "test" into it and it returned the value "test" in the cell containing the formula. When I clear the text cell "test" (k301) the cell containing the formula goes blank which is good in my case. I hope this makes sense.
 
Upvote 0
This formula: =IF(ISNA(VLOOKUP(A301,'VLOOKUP CONTAINER'!K301:L301,2)),"",IF(VLOOKUP(A301,'VLOOKUP CONTAINER'!K301:L301,2)=0,"",VLOOKUP(A301,'VLOOKUP CONTAINER'!K301:L301,2)))

returns a blank cell. I tested the cell (k301) on by typing the value "test" into it and it returned the value "test" in the cell containing the formula. When I clear the text cell "test" (k301) the cell containing the formula goes blank which is good in my case. I hope this makes sense.
Ok, if you're using Excel 2007 you can shorten that formula significantly and make it more robust at the same time.

=IFERROR(T(VLOOKUP(A301,'VLOOKUP CONTAINER'!K301:L301,2,0)),"")
 
Upvote 0
Yes...the current formula is quite long. Can I ask...what is the "T" value bold and underlined in the formula represent?

=IFERROR(T(VLOOKUP(A301,'VLOOKUP CONTAINER'!K301:L301,2,0)),"")
 
Upvote 0
Yes...the current formula is quite long. Can I ask...what is the "T" value bold and underlined in the formula represent?

=IFERROR(T(VLOOKUP(A301,'VLOOKUP CONTAINER'!K301:L301,2,0)),"")
T stands for TEXT.

If the referenced value is TEXT then T(...) returns that value otherwise returns blank "" (unless it's an error then it returns the error).

Book1
AB
1texttext
2xx
3__
410_
5#N/A#N/A
Sheet2

Formula entered in B1 and copied down:

=T(A1)
 
Upvote 0
This formula: =IF(ISNA(VLOOKUP(A301,'VLOOKUP CONTAINER'!K301:L301,2)),"",IF(VLOOKUP(A301,'VLOOKUP CONTAINER'!K301:L301,2)=0,"",VLOOKUP(A301,'VLOOKUP CONTAINER'!K301:L301,2)))

OK, I'm very confused...which is not unusual :rofl:

You have a 1 Row array in the vlookup.
Rendering the Vlookup pointless, you could just do this
=IF('VLOOKUP CONTAINER'!K301<>A301,"",IF('VLOOKUP CONTAINER'!L301="","",'VLOOKUP CONTAINER'!L301))

But I guess you are just "simplifying" the formula for our reading benefit...


Also, I think you are completely missunderstanding the main question T. Valko is asking...


We know sometimes Vlookup returns #N/A because it doesn't find the match
We know sometimes Vlookup returns 0 because the resulting cell is blank or 0.

Now, ignoring those occasional results, when the vlookup actually does what you expect it to do...
What type of values do you expect the vlookup to return? Text or Number or could be either?

In other words, forget about your vlookup for a moment,
what type of data is in Column L, text/number/either ?
 
Last edited:
Upvote 0
It works perfect.

I can't tell you how many threads I viewed on this particular "vlookup..return blank cell value". I Saw plenty of the IFERROR(Vlookup...) but
and none of them showed the "T" (text) portion of the formula syntax as yours which of course did the trick.

This is why I didn't sign up to post on any other sites except Mr. Excels question board!

Very happy and many grateful thank you's,
dh
 
Upvote 0

Forum statistics

Threads
1,225,169
Messages
6,183,318
Members
453,155
Latest member
joncaxddd

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