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")

[TABLE="width: 614"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD][TABLE="width: 500"]
<tbody>[TR]
[TD]vegas pool party closing 2017[/TD]
[TD]FAIL[/TD]
[/TR]
[TR]
[TD]vip pool party las vegas july 2018[/TD]
[TD]FAIL[/TD]
[/TR]
[TR]
[TD]vegas pool parties 2019[/TD]
[TD]PASS[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: right"][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Any advice welcome,
David
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
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,224,823
Messages
6,181,184
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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