View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
mr_espresso mr_espresso is offline
external usenet poster
 
Posts: 5
Default How to search a cell for multiple keywords?

Thanks, JMB.

Your formula may be less efficient, but it actually worked better. The
other formula mistakenly assigned 0's to cells which should have been
1's.

On Apr 28, 10:56 am, JMB wrote:
Actually, you could use search for multiple terms. Assuming your data is in
A1:A9

=--(SUMPRODUCT(--(ISNUMBER(SEARCH({"doc*","nur*","param*"},A1:A9))) )0)

But, it has to use an extra nested function call (Isnumber), so it's not as
efficient as JE's.

"mr_espresso" wrote:
Since the search function only allows one search term at a time, how
can one search a cell for several keywords?


For example, I want to search a survey comments field for terms like
<doctor, nurse, paramedic and I need to use wildcards like <doct*.
Ideally the function would return a 1 if one or more of the keywords
is present, and a 0 if none are found.


My apologies if this question already has been addressed, but I didn't
see anything in the archives.


Thank you in advance!