Date coming up as 1/0/1900 on blank cell

ecrodrig

Board Regular
Joined
Jan 21, 2022
Messages
99
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
I have the following formula:

=IF($B2="Lorenzo",(XLOOKUP($E2,[Status.xlsx]Lorenzo!$C:$C,[Status.xlsx]Lorenzo!E:E,"No new date")),IF($B2="Marta",(XLOOKUP($E2,[Status.xlsx]Marta!$C:$C,[Status.xlsx]Marta!E:E,"No new date")),IF($B2="Richard",(XLOOKUP($E2,[Status.xlsx]Richard!$C:$C,[Status.xlsx]Richard!E:E,"No new date")),IF($B2="Katia",(XLOOKUP($E2,[Status.xlsx]Katia!$C:$C,[Status.xlsx]Katia!E:E,"No new date")),IF($B2="Joe Mack",(XLOOKUP(E2,[Status.xlsx]Joe!$C:$C,[Status.xlsx]Joe!E:E,"No new date")), IF($B2="Armand",(XLOOKUP($E2,[Status.xlsx]Armand!$C:$C,[Status.xlsx]Armand!E:E,"No new date")), IF($B2="Ravi",(XLOOKUP($E2,[Status.xlsx]Ravi!$C:$C,[Status.xlsx]Ravi!E:E,"No new date")), "N/A")))))))

Everything works fine except for a couple of rows. Excel is showing those as a 0 rather than a blank cell, so instead of giving me "No new date" as the output, it gives me a 1/0/1900. The format of the column is short date. If I change it to general, it shows a 0. How can I fix this?

1664886709991.png


Any help would be appreciated. Thanks.
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
That suggest that the value in E2 was found on the relevant sheet but that col E was empty.
 
Upvote 0
That suggest that the value in E2 was found on the relevant sheet but that col E was empty.
That is correct yet if you notice the picture all other rows are coming out as they should and those rows also have column E blank.
 
Upvote 0
Ok, how about
Excel Formula:
=LET(Sht,SWITCH($B2,"Lorenzo",[Status.xlsx]Lorenzo!$C:$E,"Marta",[Status.xlsx]Marta!$C:$E,"Richard",[Status.xlsx]Richard!$C:$E,"Katia",[Status.xlsx]Katia!$C:$E,"Joe Mack",[Status.xlsx]Joe!C:E,"Armand",[Status.xlsx]Armand!$C:$E,"Ravi",[Status.xlsx]Ravi!$C:$E,"N/A"),IF(ROWS(Sht)=1,"N/A",IFERROR(1/(1/VLOOKUP(E2,Sht,3,0)),"")))
 
Upvote 0
Ok, how about
Excel Formula:
=LET(Sht,SWITCH($B2,"Lorenzo",[Status.xlsx]Lorenzo!$C:$E,"Marta",[Status.xlsx]Marta!$C:$E,"Richard",[Status.xlsx]Richard!$C:$E,"Katia",[Status.xlsx]Katia!$C:$E,"Joe Mack",[Status.xlsx]Joe!C:E,"Armand",[Status.xlsx]Armand!$C:$E,"Ravi",[Status.xlsx]Ravi!$C:$E,"N/A"),IF(ROWS(Sht)=1,"N/A",IFERROR(1/(1/VLOOKUP(E2,Sht,3,0)),"")))
This did not work, now almost everything is coming up as 1/0/1900
 
Upvote 0
That cannot happen with the formula I suggested, it will either return a non-zero number, N/A or a blank ""
 
Upvote 0
That cannot happen with the formula I suggested, it will either return a non-zero number, N/A or a blank ""
Ok, something funky was going on with my spreadsheet, sorry about that. Now I get everything blank although I should be seeing dates if a date was present. I did the following:

= Let(x,IF($B2="Lorenzo",(XLOOKUP($E2,[Status.xlsx]Lorenzo!$C:$C,[Status.xlsx]Lorenzo!E:E,"")),IF($B2="Marta",(XLOOKUP($E2,[Status.xlsx]Marta!$C:$C,[Status.xlsx]Marta!E:E,"")),IF($B2="Richard",(XLOOKUP($E2,[Status.xlsx]Richard!$C:$C,[Status.xlsx]Richard!E:E,"")),IF($B2="Katia",(XLOOKUP($E2,[Status.xlsx]Katia!$C:$C,[Status.xlsx]Katia!E:E,"")),IF($B2="Joe",(XLOOKUP(E2,[Status.xlsx]Joe!$C:$C,[Status.xlsx]Joe!E:E,"")), IF($B2="Armand",(XLOOKUP($E2,[Status.xlsx]Armand!$C:$C,[Status.xlsx]Armand!E:E,"No new date")), IF($B2="Ravi",(XLOOKUP($E2,[Status.xlsx]Ravi!$C:$C,[Status.xlsx]Ravi!E:E,"")), IF($B2="Jessie",(XLOOKUP($E2,[Status.xlsx]Jessie!$C:$C,[Status.xlsx]Jessie!E:E,"")), "N/A")))))))), IF(ROWS(x)=0, "Nope",""&x&""))

This works out great except that the dates are coming up as numbers even though my column is formatted as dates. Here is a picture of what I see with my formula above :

1664984940623.png
 
Upvote 0
The last part of the formula should be just x, you are turning it into text.
 
Upvote 0
Solution
Glad to help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,547
Messages
6,125,461
Members
449,228
Latest member
moaz_cma

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top