Help

Re: Help with nested IF statement

Solved
Jump to Solution
555 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Keren_Aarons
5 - Automation Enthusiast
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
Kamille_Parks
16 - Uranus
16 - Uranus

Try the following formula:

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

See Solution in Thread

2 Replies 2
Kamille_Parks
16 - Uranus
16 - Uranus

Try the following formula:

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

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?