Help

Save the date! Join us on October 16 for our Product Ops launch event. Register here.

Nested IF formulas with FIND function

Topic Labels: Formulas
Solved
Jump to Solution
1278 3
cancel
Showing results for 
Search instead for 
Did you mean: 
Laurie_Tovo
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello,

I am trying to create a formula to return the category of my campaign based on the campaign name. For example, if my campaign is “Carlie Bookcase-Manual-Walmart” I want it to return “Bookcases”. I looked into nested IF formulas and FIND formulas and tried to combine them.

I got it to work for 1 category using this:
IF((FIND(“Desk”,{Campaign Name})),“Desk - Vanity”)

But if I try to add more criteria for other categories my formula is invalid. Here is the invalid formula:
IF(
(FIND(“Desk”,{Campaign Name})),
"Desk - Vanity”,
IF(
(FIND("Dining”,{Campaign Name})),
"Dining Tables”,
)
)

1 Solution

Accepted Solutions

The styled quotes are most likely due to the fact that the formula wasn’t formatted as plain text (tip for @Laurie_Tovo: use the </> button on the toolbar to create this styling, which makes formulas easier to read and safer to copy/paste). I ran a test with the extra parentheses, and they don’t cause a problem. What I didn’t catch until I tried this formula myself is the trailing comma after “Dining Tables”. Take it out and it’ll work. (And remove the extra parentheses around the FIND() functions while you’re in there. :slightly_smiling_face: )

IF(
    FIND("Desk", {Campaign Name}),
    "Desk - Vanity",
    IF(
        FIND("Dining", {Campaign Name}),
        "Dining Tables"
    )
)

See Solution in Thread

3 Replies 3
augmented
10 - Mercury
10 - Mercury

Hi Laurie. You use one more set of parens than I would but the only other issue I see may be the type of double quotes you use. I see two different types. Change them all to " or even single quotes '.

The styled quotes are most likely due to the fact that the formula wasn’t formatted as plain text (tip for @Laurie_Tovo: use the </> button on the toolbar to create this styling, which makes formulas easier to read and safer to copy/paste). I ran a test with the extra parentheses, and they don’t cause a problem. What I didn’t catch until I tried this formula myself is the trailing comma after “Dining Tables”. Take it out and it’ll work. (And remove the extra parentheses around the FIND() functions while you’re in there. :slightly_smiling_face: )

IF(
    FIND("Desk", {Campaign Name}),
    "Desk - Vanity",
    IF(
        FIND("Dining", {Campaign Name}),
        "Dining Tables"
    )
)

It works! Thank you so much for your help, this is very helpful