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

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
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,215,433
Messages
6,124,861
Members
449,195
Latest member
MoonDancer

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