I use this handy equation to search for a term inside of a cell in excel.
=IF(ISNUMBER(SEARCH("*Gingrich*",C1)),"1","")
This equation searches for the presence of Gingrich in C1, if it exists, it displays a 1.
All I'd like to do is search for more than one term at a time. Anyone know how to add an OR function into this so I can search for Gingrich OR Obama OR Romney etc... ?
This will do it for you:
Given this function in the column to the right of the names (which are in column C), the result is:
Try using COUNT function like this
=IF(COUNT(SEARCH({"Romney","Obama","Gingrich"},C1)),1,"")
Note that you don't need the wildcards (as teylyn says) and unless there's a specific reason "1" doesn't need quotes (in fact that makes it a text value)
Another way
Also, if you keep a list of values in, say A1 to A3, then you can use
The wildcards are not necessary at all in the Search() function, since Search() returns the position of the found string.