Checking for multiple words (text) in a cell

Closed
BarQuest - Jul 8, 2010 at 09:23 AM
 bored kid - Oct 13, 2010 at 09:02 PM
Hello,

In excel 2007 I need to tweak the follwing formula:

=IF(ISNUMBER(FIND("PIZZA",A307)),"true","false")

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



2 responses

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.
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Jul 9, 2010 at 05:03 PM
how many words are we talking about here