How to check if a date is between specific days compared using the TODAY() function
Let's split up your formula so you can find the error.
=IF(
E10>(TODAY()),
"Schedule CPD Presentation asap and consider changing sales start date",
IF(
AND(
E10 <= (TODAY()-1,E10< TODAY() +10),
"Query 1",
"Query 2"
)
)
)
That's not what you want. The error is on this line:
E10 <= (TODAY()-1,E10< TODAY() +10),
You haven't matched your parentheses correctly. The entire AND()
statement should be like this:
AND(E10<=TODAY()-1,E10<TODAY()+10)
... but yours is like this:
AND(E10<=(TODAY()-1,E10<TODAY()+10)
The extra parentheses before the first TODAY()
throws everything off so the AND()
function isn't getting something it can deal with. If you delete that one parentheses (and one at the end), your formula looks like this:
=IF(E10>(TODAY()), "Schedule CPD Presentation asap and consider changing sales start date", IF(AND(E10 <= TODAY()-1,E10< TODAY() +10), "Query 1", "Query 2"))
... which can be broken out like this:
=IF(
E10>(TODAY()),
"Schedule CPD Presentation asap and consider changing sales start date",
IF(
AND(
E10 <= TODAY()-1,
E10< TODAY() +10
),
"Query 1",
"Query 2"
)
)