Checking for multiple words (text) in a cell

 bored kid -

In excel 2007 I need to tweak the follwing formula:


So that it will look for multiple words, such as "STEAKHOUSE" "DINER" "APPLEBEES" etc.

2 replies

I'm not sure if this is exactly what you're looking for, but I use excel to balance my checkbook and I created this formula to categorize each of the transactions so that I can track my spending better. The formula has three categories: Drinks, Restaurants, and Fuel. in this example the formula is looking at cell N69 and it searches for multiple key words or phrases to determine which category the transaction goes in.

=IF(ISERR(SEARCH("coke",N69)),IF(ISERR(SEARCH("gas",N69)),IF(ISERR(SEARCH("wendy's",N69)),NA(), "restaurants"),"fuel"),"Snacks")

In N69 I typed "Walmart- coke & chips - $3", so M69 displays "Snacks"
If i had typed "Chevron - Gas" M69 would display "Fuel"

to add another category or extra key word you want to find, insert
"IF(ISERR(SEARCH("chips",N69)),NA(), "Snacks")" where "NA()" is.

Hope it helps.
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 2821 users have said thank you to us this month

Registration date
Thursday January 28, 2010
Last seen
August 2, 2020
how many words are we talking about here