Formula returns a zero

  • Thread starter Thread starter st24961
  • Start date Start date
S

st24961

Hi ,
I used the following formula in one of my excel worksheet and the cell
value returns a zero if value in cell B4 is not in the lookup data
range. Is there a way to keep the cell value blank ? I now use a
workaround by using the same color for the cell and font. Any advice ?


=IF(B4="","",VLOOKUP(B4,$AD$3:$AE$48,2,TRUE))

Thanks
Regards
ST
 
This could perhaps give you some clues...

=IF(B4="","",IF(VLOOKUP(B4,$AD$3:$AE$48,2,TRUE)=0,"",VLOOKUP(B4,$AD$3:$AE$48,2,TRUE)))

Also... I usually us VLOOKUP(B4,$AD$3:$AE$48,2,FALSE) or 0 instead o
False (same thing) to find exact matches. That way I don't need to sor
the lookup table.
Then use ...IF(ISERROR(VLOOKUP(B4,$AD$3:$AE$48,2,0)),"",...

Hope it helped
Ola Sandströ
 
olasa said:
This could perhaps give you some clues...

=IF(B4="","",IF(VLOOKUP(B4,$AD$3:$AE$48,2,TRUE)=0,"",VLOOKUP(B4,$AD$3:$AE$48,2,TRUE)))

Also... I usually us VLOOKUP(B4,$AD$3:$AE$48,2,FALSE) or 0 instead o
False (same thing) to find exact matches. That way I don't need to sor
the lookup table.
Then use ...IF(ISERROR(VLOOKUP(B4,$AD$3:$AE$48,2,0)),"",...

Hope it helped
Ola Sandström


Hi,
Apply your formula and it works. Thanks for your speedy reply.

Regards
S
 
Back
Top