Avatar of route217
route217
Flag for United Kingdom of Great Britain and Northern Ireland asked on

formula returning 00/00/1900 dates as opposed to blank

Hi Experts using excel 2010

i have the following formula IF(AND(MilestoneName="Parent",GJ6=""),"",VLOOKUP(B6,$B$6:$DU$919,$GI$4,0))

which when the look up works should return back a blank as opposed to 00/00/1900 dates when the referenced column has no dates in it...

can see the error...
Microsoft ExcelMicrosoft Office

Avatar of undefined
Last Comment
Rob Henson

8/22/2022 - Mon
Shums Faruk

Format cell to General and check
route217

ASKER
Showing as 0...but need blanks
Shums Faruk

Try this formula:
=IF(AND(MilestoneName="Parent",GJ6=""),"",IFERROR(VLOOKUP(B6,$B$6:$DU$919,$GI$4,0),""))

Open in new window

Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
route217

ASKER
Still seeing 0. not blanks
Shums Faruk

Try this:
=IFERROR(IF(AND(MilestoneName="Parent",GJ6=""),"",VLOOKUP(B6,$B$6:$DU$919,$GI$4,0)),"")

Open in new window

SOLUTION
Shums Faruk

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Rob Henson

Try this:

=IF(AND(MilestoneName="Parent",GJ6=""),"",IF(ISBLANK(VLOOKUP(B6,$B$6:$DU$919,$GI$4,0)),"",VLOOKUP(B6,$B$6:$DU$919,$GI$4,0)))

When vlookup finds the lookup value but the result is empty, the result of the vlookup is 0 eventhough it really finds a blank. You can check for the blank with ISBLANK function.

Thanks
Rob
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
Rob Henson

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
route217

ASKER
Just notice the cell has custom format of [<1]"";dd-mm-yy
route217

ASKER
Thanks all solved it appropriate excellent feedback.
Rob Henson

Also could try custom format:

dd-mm-yy;;""

Custom formats have 3 sections separated by semi-colon
 Positive - formatted as dd-mm-yy
 Negative - no format as you can't have negative dates
 Zero - formatted as ""
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Rob Henson

Glad to help.
Rob Henson

Just a quick note regarding the accepted results:

Shums solution checks for 3 conditions:
MilestoneName = "Parent"
AND  GJ6 = Blank
AND  VLOOKUP result = 0

With those 3 conditions it will give blank result.

If the VLOOKUP result is not 0 but the other two conditions are met, the result will still be the result of the VLOOKUP.