Jun 20, 2022 07:51 AM
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!
Solved! Go to Solution.
Jun 20, 2022 09:24 AM
IF statements can have up to 3 arguments. Your first IF has 4 arguments:
^ 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}
Jun 20, 2022 09:24 AM
IF statements can have up to 3 arguments. Your first IF has 4 arguments:
^ 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}
Jun 21, 2022 08:18 AM
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!
Jun 21, 2022 09:48 AM
replace {Discount} != "FREE TRIAL"
with
AND({Discount} != "FREE TRIAL", {Discount} != "FREE SAMPLE")