Skip to main content

Hi,


I am currently trying to use an if formula to display emojis to highlight the status of a license (date field). I currently have:-


IF(IS_AFTER(TODAY(), {END DATE}), “ 🛑 EXPIRED”, IF(IS_SAME(TODAY(), {END DATE}), “ 📆 EXPIRES TODAY”, IF(IS_AFTER(TODAY(), DATEADD({END DATE}, -1, ‘week’)), “ ⚠ EXPIRES SOON”)))


The formula is working fine but I wanted to add ELSE display “ ✔ ACTIVE” but can’t seem to figure it out.


Thanks

You just needed to add to the end the last IF block. It’s a little easier to understand what’s going on if you edit while indenting (just make sure you take the indentations out before running it).


IF(
IS_AFTER(TODAY(), {END DATE}),
🛑 EXPIRED”,
IF(
IS_SAME(TODAY(),{END DATE}),
📆 EXPIRES TODAY”,
IF(
IS_AFTER(TODAY(),DATEADD({END DATE}, -1, ‘week’)),
⚠ EXPIRES SOON”),
"✔ ACTIVE"
)
)
)

Explanation


Each IF block works like this:


IF(LOGIC, what happens if true, what happens if false)


Since you’re nesting IF blocks, ‘what happens if false’ has been routing you to the next IF blocks. But with the last (or most nested) IF block, you hadn’t provided a false return value.


Reply