Help

IF AND OR SEARCH - What do I use?

Solved
Jump to Solution
1426 2
cancel
Showing results for 
Search instead for 
Did you mean: 
bugpy
4 - Data Explorer
4 - Data Explorer

I’ve tried searching for an answer similar to mine, but having no luck with what I’m after.

Essentially I want a formula for auto-writing Recipe SEO Titles based off other fields.

Currently I have something simple that I always have to edit:
{Site Name} & IF({Column A}, {Column A}, "") & IF({Column B}, "Vegetarian", "") & IF({Column C}, {Column C}, "") & IF({Column D}, "Vegan", "") & IF({Column E}, {Column E}, "") & {Sep} & {Name of Dish}

Ideally I’d like the formula to read this:

(Site Name)
AND IF
(Name of Dish) CONTAINS (Column A) SHOW “Budget Meal” ELSE (Column A)
OR IF
(Name of Dish) CONTAINS (Column B) SHOW “Vegetarian” ELSE (Column B)
OR IF
(Name of Dish) CONTAINS (Column C) SHOW “Student Meal” ELSE (Column C)
OR IF
(Name of Dish) CONTAINS (Column D) SHOW “Vegan” ELSE (Column D)
OR IF
(Name of Dish) CONTAINS (Column E) SHOW “Healthy Meal” ELSE (Column E)
AND (Seperator) AND (Name of Dish)

Is that possible?

1 Solution

Accepted Solutions
JonathanBowen
13 - Mars
13 - Mars

Hi @bugpy - how about this:

Screenshot 2019-08-29 at 15.11.49.png

I’ve just shown this with the “budget” element, but you can easily extend to vegetarian, student and so on.

You have your site name, name of dish and a keyword for the budget classification. The “Budget” formula field is:

IF(SEARCH(LOWER({Budget Keyword}), LOWER({Name of Dish})), 'Budget', {Budget Keyword})

and the SEO Text field is:

{Site Name} & ' ' & IF(Budget, Budget) & ' | ' & {Name of Dish}

If this works for you, then just extend for each category with a pair of fields - Vegetarian Keyword/Vegetarian, Student Keyword/Student, etc and modify the SEO Text formula.

JB

See Solution in Thread

2 Replies 2
JonathanBowen
13 - Mars
13 - Mars

Hi @bugpy - how about this:

Screenshot 2019-08-29 at 15.11.49.png

I’ve just shown this with the “budget” element, but you can easily extend to vegetarian, student and so on.

You have your site name, name of dish and a keyword for the budget classification. The “Budget” formula field is:

IF(SEARCH(LOWER({Budget Keyword}), LOWER({Name of Dish})), 'Budget', {Budget Keyword})

and the SEO Text field is:

{Site Name} & ' ' & IF(Budget, Budget) & ' | ' & {Name of Dish}

If this works for you, then just extend for each category with a pair of fields - Vegetarian Keyword/Vegetarian, Student Keyword/Student, etc and modify the SEO Text formula.

JB

bugpy
4 - Data Explorer
4 - Data Explorer

@JonathanBowen ah ok. Probably a much easier way of doing it! Just managed to make it work through a few columns of formulas and now it’s all automated!

Thank you!