vlookup question.

I

IowaBuckMaster

=VLOOKUP(D84,JobListValues,4)

Works fine unless the value I want returned is a blank cell. vlooku
returns a 0 and not my blank. So my question is how do I get my blan
cell to return in the vlookup instead of the vlookup result of 0.

Haven't used vlookup before.

:confused
 
R

Randall Roberts

If 0 isnt needed to be returned as an answer to the lookup you can use

=IF(VLOOKUP(D84,JobListValues,4)=0,"",VLOOKUP(D84,JobListValues,4))

Randall
 
G

George Nicholson

=If(Len(VLOOKUP(D84,JobListValues,4)=0,"",VLOOKUP(D84,JobListValues,4))
Translation: If the length of the result is 0, return "", otherwise return
the value.

Note: some of the other responses I've seen to this posting will return an
empty string if the looked-up value is either blank *OR* zero. This version
returns an empty string only if the cell is empty. If the cell contains 0,
it returns 0.

Hope this helps,
 
D

Dave Peterson

I've seen =vlookup() return a 0 if the cell were blank, but never the other way
around.

=if(vlookup()="","",vlookup())

Is another way.
 
P

Peo Sjoblom

True but you forgot a parenthesis

=IF(LEN(VLOOKUP(D84,JobListValues,4))=0,"",VLOOKUP(D84,JobListValues,4))

--

Regards,

Peo Sjoblom

George Nicholson said:
=If(Len(VLOOKUP(D84,JobListValues,4)=0,"",VLOOKUP(D84,JobListValues,4))
Translation: If the length of the result is 0, return "", otherwise return
the value.

Note: some of the other responses I've seen to this posting will return an
empty string if the looked-up value is either blank *OR* zero. This version
returns an empty string only if the cell is empty. If the cell contains 0,
it returns 0.

Hope this helps,
 

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