Assistance with Date Formula

Occasional Contributor

Hi there, 


After spending the last 45 minutes researching and trying to troubleshoot this myself, I have given up and am now seeking support. 


I am trying to create the following statement (written in English)


If cell (call it D2) is not blank AND is today's date or after, then return "YES" otherwise, leave blank. 


I am able to independently make these formulas work using =IF(NOT(ISBLANK() and =IF>=TODAY() but I can't seem to make them work together. 


Additionally, I'd like to be able to simply create a If cell is not blank, then do the following... And that also seems to fail. 


Any help would be most appreciated!

4 Replies


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", "")

Hi @Hans Vogelaar 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)

best response confirmed by Space250 (Occasional Contributor)


Yes, that is a different situation. An empty cell is treated as "less than" any date. So:


=IF(AND(D2<>"", D2<=TODAY()), "YES", "")

Thank you so much, that did the trick!