# Help with nested IF statement

Topic Labels: Formulas
Solved
821 2
cancel
Showing results for
Did you mean:
5 - Automation Enthusiast

Hi all

I need some help with formatting a nested IF statement as I can’t understand why it’s not working. Here’s the background:

I have a {Start Date} field and an {End Date} field - both are formatted as “Date fields”. I want to check the current day - TODAY() against these dates and print out an emoticon depending on the result. I can get this single IF statement to work:

(If the END DATE is AFTER today, then print “ :horse_racing: ” (running!), if not, then print “ :heavy_check_mark: ” (completed!)

IF(IS_AFTER({End Date}, TODAY())=1,“ :horse_racing: ”, “ :heavy_check_mark: ”)

However I want to add a third condition for the future:

(If the END DATE is AFTER today, then print “ :horse_racing: ” (running!), If the START DATE is AFTER today, then print “ :crystal_ball: ” (future!), if not, then print “ :heavy_check_mark: ” (completed!)

So I have this which doesn’t work and throws up an error:

IF(
IS_AFTER({End Date},TODAY())=1,
“ :horse_racing: ”,
IF (IS_AFTER({Start Date}, TODAY())=1,
“ :crystal_ball: ”,
“ :heavy_check_mark: ”
)
)

What am I doing wrong?

1 Solution

Accepted Solutions
16 - Uranus

Try the following formula:

``````IF(
{Start Date} > TODAY(),
":crystal_ball:"
IF(
{End Date} > TODAY(),
":horse_racing:",
":heavy_check_mark:"
)
)
``````
2 Replies 2
16 - Uranus

Try the following formula:

``````IF(
{Start Date} > TODAY(),
":crystal_ball:"
IF(
{End Date} > TODAY(),
":horse_racing:",
":heavy_check_mark:"
)
)
``````
5 - Automation Enthusiast

Thanks Kamille!

I just had to add a comma after “ :crystal_ball: ” (so “ :crystal_ball: ”,) to get it it work.

Any idea why my effort didn’t do the trick?