SOLVED

# Assistance with Date Formula

Copper Contributor

# Assistance with Date Formula

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

# Re: Assistance with Date Formula

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

# Re: Assistance with Date Formula

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)

best response confirmed by Space250 (Copper Contributor)
Solution

# Re: Assistance with Date Formula

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

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

# Re: Assistance with Date Formula

Thank you so much, that did the trick!
1 best response

Accepted Solutions
best response confirmed by Space250 (Copper Contributor)
Solution

# Re: Assistance with Date Formula

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

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