A Formula to search for three different text strings in 1 column

Pingbat

New Member
Joined
Jun 20, 2016
Messages
20
HI :)

I've got a spread sheet with text data. I need a formula to search for any instances of a text string "2017, 2018 or 2019" & get a FAIL output in the adjacent column.

I get success with the below formula but i just cant get / re work it to search for three different words, e.g. 2017 2018 or 2019. :(

=IF(OR(ISNUMBER(SEARCH("2017",A2)),ISNUMBER(SEARCH("2018",A2))),"FAIL","PASS")

vegas pool party closing 2017FAIL
vip pool party las vegas july 2018FAIL
vegas pool parties 2019PASS

<tbody>
</tbody>

<colgroup><col><col><col></colgroup><tbody>
</tbody>

Any advice welcome,
David
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
How about
=IF(OR(ISNUMBER(SEARCH({"2017","2018","2019"},A2)),),"FAIL","PASS")
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,216,583
Messages
6,131,557
Members
449,655
Latest member
Anil K Sonawane

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