Forum Discussion
Assistance with Date Formula
- Feb 16, 2023
Yes, that is a different situation. An empty cell is treated as "less than" any date. So:
=IF(AND(D2<>"", D2<=TODAY()), "YES", "")
If D2 is on or after today, it is not blank, so we don't have to check for the cell being not blank:
=IF(D2>=TODAY(), "YES", "")
If you only want to check if the cell is not blank:
=IF(D2<>"", "YES", "")
- Space250Feb 16, 2023Copper Contributor
Hi HansVogelaar thanks so much for your fast response
This seems so obvious and makes sense, but there is one situation where it doesn't seem to work:
If D2 is entirely blank (there's no text/date/etc. entered) it results with "YES" with the formula: =IF(D2 <=TODAY(),"YES",""). Any way to avoid this?
(quick note, I reversed then >= to <= as I had it backwards in my original post)- HansVogelaarFeb 16, 2023MVP
Yes, that is a different situation. An empty cell is treated as "less than" any date. So:
=IF(AND(D2<>"", D2<=TODAY()), "YES", "")
- Space250Feb 16, 2023Copper ContributorThank you so much, that did the trick!