Skip to main content

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!

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}

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!


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")

Reply