Help with nested IF statement

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?

Try the following formula:

IF(
   {Start Date} > TODAY(),
   ":crystal_ball:"
   IF(
      {End Date} > TODAY(),
      ":horse_racing:",
      ":heavy_check_mark:"
   )
)
1 Like

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?

This topic was solved and automatically closed 3 days after the last reply. New replies are no longer allowed.