# Mulitple IF statement with DATEVALUE & VLOOKUP

=IFERROR(IF(VLOOKUP([@[Store '#]],ISS!\$C:\$HX,21,FALSE)="",DATEVALUE("01/01/3000"),VLOOKUP([@[Store '#]],ISS!\$C:\$HX,21,FALSE)),DATEVALUE("01/01/3000"))

I would like for statement to read If Field 23 is blank then use the date in field 21, if field 21 is blank then return 1/1/3000 else return date in field 23

I tried this function but got False  where I would like 1/1/3000 to populate: =IFERROR(IF(VLOOKUP([@[Store '#]],ISS!\$C:\$HX,23,FALSE)="",IF(VLOOKUP([@[Store '#]],ISS!\$C:\$HX,21,FALSE)="",DATEVALUE("01/01/3000")),VLOOKUP([@[Store '#]],ISS!\$C:\$HX,23,FALSE)),DATEVALUE("01/01/3000"))
###### Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
Can you attach a sample of the spreadsheet?
Microsoft Excel ExpertCommented:
=IFERROR(IF(VLOOKUP([@[Store '#]],ISS!\$C:\$HX,21,FALSE)="",DATEVALUE("01/01/3000"),if(VLOOKUP([@[Store '#]],ISS!\$C:\$HX,23,FALSE)="",VLOOKUP([@[Store '#]],ISS!\$C:\$HX,21,FALSE)))"")
Finance AnalystCommented:
Prof JJ - missing comma before double quotes at end of formula.

How about, if not already covered, in logic syntax rather than formula:

IF ( AND (Lookup 21 = "", Lookup 23 = "") Then "01/01/3000" Else IF Lookup 23 = Blank Then Lookup 21 Else Lookup 23 )

All bound within an IFERROR (Formula, "")

Hope that makes sense and can be interpreted to formula.

Thanks
Rob H

Experts Exchange Solution brought to you by