Dateadd with If formula

Hi

I am trying to add a formula that will show a renewal date 3 years from the subscription date (yr 1) but not show anything for implementation period or yr 2, yr 3.

IF ({Impl /Sched Fee} = Subscription Yr1), (DATEADD({Inv Date}, 3,’ years’), "None ")))

I continue to get errors on this formula

Welcome to the community, Janet! :smiley: I see a few possible error points in your formula:

  1. There can be no space between IF and its opening parenthesis. IF is a function, and all of Airtable’s functions require that the function name be immediately adjacent to its opening parenthesis.

  2. You’ve got extra parentheses wrapped around certain parts of the IF function. The basic IF function syntax is:

    IF(condition, result-if-true, optional-result-if-false)

  3. I’m guessing that “Subscription Yr1” is a field name. Because it contains spaces, it needs to be wrapped in curly braces (it’s kinda handy that this rule rhymes :wink: )

  4. You need to remove the space at the start of your ’ years’ specifier, or else DATEADD won’t recognize it. This won’t throw an error, but it just won’t calculate the addition.

With these changes, the formula should look like this:

IF({Impl /Sched Fee} = {Subscription Yr1}, DATEADD({Inv Date}, 3,'years'), "None")

Thank you so much this worked great!