How to use the IF formula to calculate the difference between 2 dates based on a condition

Hello,

I need help with using the IF formula. This is what I have so far:

IF({Re-engaged}>0,DAYS({Re-engaged},{Active Shadow}),DAYS(TODAY(),{Active Shadow})

What I am trying to achieve is:

  1. If the re-engaged date column is not blank i.e. >0, then I want to get the number of days between the Active Shadow date column and the re-engaged date column.
  2. If the re-engaged date column is blank, then I want to get the number of days between today’s date and the active shadow date column.

There is currently a formula error and I’m not sure how to fix this. Can you please help?

Hi @lenazheng,

You’re missing a closing parenthesis at the end.

IF({Re-engaged}>0,
    DAYS({Re-engaged},{Active Shadow}),
    DAYS(TODAY(),{Active Shadow})
)