Using VLOOKUP and text

G

Guest

I am using a Vlookup function to find dollar values, dates, and names of
vendors made within a department.
The dollar values are appearing correctly, but the dates appears as
"01/00/00" when the field is empty and all the text strings appear as "0"
even though there is a name in the source sheet.
I have changed the formatting of each cell to be correct to the appropriate
format (accountancy, date, text) and even tried 'general' to fix this text
problem to no avail.
HELP!!
 
D

Dave Peterson

If A1 is empty, and you put this in B1: =a1
You'll see it returns a 0.

Same thing happens with your =vlookup()--but 0 formatted as a date is
January 0th, 1900 (or 01/00/00 in your format).

So you can modify the =vlookup() to check to see if the "sending" cell is empty:

=if(vlookup(a1,sheet2!a:b,2,false)="","",vlookup(a1,sheet2!a:b,2,false))
 

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