if vlookup

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm using a vlookup to populate my summary sheet with data from the MASTER
DATABASE sheet

=VLOOKUP($B2, 'MASTER DATABASE'!$A:$AY,8,FALSE)
The above formula works fine - except for when the cell where I am pulling
the data from is blank. Excel then returns a value of 0 and I want the cell
to remain blank. I know this is some variation of an IF statement but can't
get it to work.

Thank you.
 
=IF(VLOOKUP($B2, 'MASTER DATABASE'!$A:$AY,8,FALSE)="","",VLOOKUP($B2, 'MASTER
DATABASE'!$A:$AY,8,FALSE))

See if this does the trick, if it is blank it should stay blank otherwise it
will calculate your formula.
 
Try this:

=IF(VLOOKUP($B2, 'MASTER DATABASE'!$A:$AY,8,FALSE)=0,"",VLOOKUP($B2,
'MASTER DATABASE'!$A:$AY,8,FALSE))

Alternatively, you could keep the formula as it is and apply
conditional formatting to the cell, such that if the cell contents is
zero then choose the foreground colour to be white, so that a zero will
show up as a blank.

Hope this helps.

Pete
 
THANK YOU!

Pete_UK said:
Try this:

=IF(VLOOKUP($B2, 'MASTER DATABASE'!$A:$AY,8,FALSE)=0,"",VLOOKUP($B2,
'MASTER DATABASE'!$A:$AY,8,FALSE))

Alternatively, you could keep the formula as it is and apply
conditional formatting to the cell, such that if the cell contents is
zero then choose the foreground colour to be white, so that a zero will
show up as a blank.

Hope this helps.

Pete
 
My apologies, tough to check some of these formulas without actual data. I
think if you follow what Pete has posted it will work as he is checking to
see if the result = 0 where i had erroneously checked for a "".
 
Try This:

=iserror(VLOOKUP($B2, 'MASTER DATABASE'!$A:$AY,8,FALSE), "", VLOOKUP($B2,
'MASTER DATABASE'!$A:$AY,8,FALSE))

Hope this will help

Hitesh
 

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

Back
Top