Help

Upcoming database upgrades. to improve our reliability at 03:30 UTC on Feb. 25 / 7:30pm PT on Feb. 24. Some users may briefly experience slow load times or error messages. Learn more here

Help with nested IF statement

Topic Labels: Formulas
Solved
Jump to Solution
307 2
cancel
Showing results for 
Search instead for 
Did you mean: 

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

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

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?