Searching for Text within specific cell

linaeum66

New Member
Joined
Jul 2, 2017
Messages
25
I am using this formula to tell me if certain text is in cell A1, "mike" in this case.

=IF(ISNUMBER(SEARCH("mike",A1)),"approve","")


How would I restructure the formula to search for three different variables and return an "approve" if ANY of them is present? For instance, lets say I am looking for "mike", "john", OR "Jim".

Thanks so much
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Try: =IF(OR(ISNUMBER(SEARCH({"mike","john","Jim"},A1))),"approve","")
 
Upvote 0
try
=IF(SUMPRODUCT(--(ISNUMBER(SEARCH({"mike","john","jim"},H3)))),"approve","")
 
Upvote 0
Hi,

Another way:


Book1
ABC
1this is mikeapprove
2john is sickapprove
3what did jack say
4who met jim at workapprove
Sheet337
Cell Formulas
RangeFormula
C1=IF(SUM(COUNTIF(A1,{"*mike*","*john*","*jim*"})),"approve","")
 
Upvote 0

Forum statistics

Threads
1,214,908
Messages
6,122,186
Members
449,071
Latest member
cdnMech

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top