
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 12, 2021 07:16 AM
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”,
)
)
Solved! Go to Solution.
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 12, 2021 09:42 PM
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"
)
)

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 12, 2021 03:45 PM
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 '.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 12, 2021 09:42 PM
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"
)
)

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 12, 2021 11:16 PM
It works! Thank you so much for your help, this is very helpful
