VLOOKUP with a blank cell

I

Iriemon

I am trying to do a vlookup that looks for the value in the cells in column A
in my table. However, some of the cells in column A are blank. My lookup
table has a blank in the first column and a code value to be returned in the
4th column. When I try to do the lookup and it encounters a blank cell, I get
a #N/A result instead of the code.
Here is the formula I have now.
=VLOOKUP(A13,$F$3:$I$13,4,FALSE)

Or should I use this as an alternate formula:

=IF(A13='"","L",VLOOKUP(A13,$F$3:$I$13,4,FALSE))

The formula above works, but I would like to use just a vlookup.

Any way around this or should I just use the 2nd formula?

Thanks
 
A

ArcticWolf

One way perhaps...

=if(iserror(vlookup(A13,$F$3:$I$13,4,FALSE)),"",vlookup(A13,$F$3:$I$13,4,FALSE))
 
B

Bernard Liengme

I think you are stuck with the IF
But how about
=IF(A13='"",I3,VLOOKUP(A13,$F$3:$I$13,4,FALSE))
so that you can change the table without worrying about the IF formula?
(I think I3 is the correct reference - check it!)
best wishes
 
R

Rich/rerat

Iriemon,
Try the following:
=IF(ISERROR(VLOOKUP(A13,$F$3:$I$13,4,FALSE)),"",VLOOKUP(A13,$F$3:$I$13,4,FALSE))
OR
=IF(ISNA(VLOOKUP(A13,$F$3:$I$13,4,FALSE)),"",VLOOKUP(A13,$F$3:$I$13,4,FALSE))

<<Should be all one line:Watch for Word Wrap in News Reader>>

--
Add MS to your News Reader: news://msnews.microsoft.com
Rich/rerat
(RRR News) <message rule>
<<Previous Text Snipped to Save Bandwidth When Appropriate>>


I am trying to do a vlookup that looks for the value in the cells in column A
in my table. However, some of the cells in column A are blank. My lookup
table has a blank in the first column and a code value to be returned in the
4th column. When I try to do the lookup and it encounters a blank cell, I get
a #N/A result instead of the code.
Here is the formula I have now.
=VLOOKUP(A13,$F$3:$I$13,4,FALSE)

Or should I use this as an alternate formula:

=IF(A13='"","L",VLOOKUP(A13,$F$3:$I$13,4,FALSE))

The formula above works, but I would like to use just a vlookup.

Any way around this or should I just use the 2nd formula?

Thanks
 
I

Iriemon

Thanks Bernard! I like the change you suggested too, makes it easy to change
values without changing the formula.

J
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top