Help

Re: IF, ELSE, OR in Formulas

Solved
Jump to Solution
3838 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Cassy_Amelia
6 - Interface Innovator
6 - Interface Innovator

Hi,

This is my current formula for an If not blank > do this OR if blank > do this:

IF({Discount}, {Brand} & " Discount Code: " & {Discount} &" off -",
IF(NOT(Discount), {Brand}))& " "&{Product Title}

But I would like to add another option that if {column} contains “FREE TRIAL” or “FREE SAMPLE” to do the same as the first line but without the '“off -”. So far I have this:

IF({Discount}="FREE TRIAL", 
{Brand} & " Discount Code: " & {Discount} &" - " & {Product Title},  
{Brand} & " Discount Code: " & {Discount} &" off -" & {Product Title},
IF(NOT({Discount}, {Brand}& " "&{Product Title})))

But it’s glitching and I know the formula isn’t correct but hopefully, someone can please help! :grinning_face_with_big_eyes:

Thank you!

1 Solution

Accepted Solutions
Kamille_Parks
16 - Uranus
16 - Uranus

IF statements can have up to 3 arguments. Your first IF has 4 arguments:

  1. {Discount}=“FREE TRIAL”
  2. {Brand} & " Discount Code: " & {Discount} &" - " & {Product Title}
  3. {Brand} & " Discount Code: " & {Discount} &" off -" & {Product Title}
  4. IF(NOT({Discount}, {Brand}& " "&{Product Title}))

^ Also the closing parenthesis for the NOT() function is in the wrong spot.

Since all outputs start with {Brand} and end with {Product Title}, and both conditions for when Discount is not empty start with " Discount Code: " & {Discount} and end with " - ", I’m going to simplify your nested IF to the bare minimum.

{Brand} & " " & IF(
  {Discount}, 
  "Discount Code: " & {Discount} & IF({Discount} != "FREE TRIAL", " off") &  " - "
) & {Product Title}

See Solution in Thread

3 Replies 3
Kamille_Parks
16 - Uranus
16 - Uranus

IF statements can have up to 3 arguments. Your first IF has 4 arguments:

  1. {Discount}=“FREE TRIAL”
  2. {Brand} & " Discount Code: " & {Discount} &" - " & {Product Title}
  3. {Brand} & " Discount Code: " & {Discount} &" off -" & {Product Title}
  4. IF(NOT({Discount}, {Brand}& " "&{Product Title}))

^ Also the closing parenthesis for the NOT() function is in the wrong spot.

Since all outputs start with {Brand} and end with {Product Title}, and both conditions for when Discount is not empty start with " Discount Code: " & {Discount} and end with " - ", I’m going to simplify your nested IF to the bare minimum.

{Brand} & " " & IF(
  {Discount}, 
  "Discount Code: " & {Discount} & IF({Discount} != "FREE TRIAL", " off") &  " - "
) & {Product Title}

Thanks Kamille, this is great!

I also need to apply the same rule for "FREE TRIAL for “FREE SAMPLE”, how might I add that to the mix, please?

Thank you!

replace {Discount} != "FREE TRIAL" with

AND({Discount} != "FREE TRIAL", {Discount} != "FREE SAMPLE")