Identify mutiple Strings Within a String of Text

maic15

Active Member
Joined
Nov 17, 2004
Messages
313
Hi,
I have 8 strings (rules) of text that need to be compared to a string of data in a cell.
For Example, data: 30,AH,EQ,MC,P2,PT,RF,S2,SN,T,ZM,ZN,

Rule: P2,S2,EQ
Result: 1 - which means it exists

So, I have a thousand records similiar to the one above.
Here are my eight rules:
Rule 1:P2,S2,EQ
Rule 2:P3,S3,EQ
Rule 3:P4,S6,ES,IC2
Rule 4:P3,S6,ET,IC1
Rule 5:P5,S6,ET,IC2
Rule 6:P3,S5,EQ
Rule 7:O
Rule 8:P
 

Some videos you may like

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

PA HS Teacher

Well-known Member
Joined
Jul 17, 2004
Messages
2,838
Can more than one rule be true at a time?

If so what would the results look like?

Is is possible to have each component for each rule in a different cell? (instead of all in the same cell)
 

PA HS Teacher

Well-known Member
Joined
Jul 17, 2004
Messages
2,838
How about something along the lines of the following:
=ISNUMBER(FIND(B$1,$A6)+FIND(B$2,$A6)+FIND(B$3,$A6)+FIND(B$4,$A6))*B5
Book1
ABCDEFGHI
1P2P3P4P3P5P3OP
2S2S3S6S6S6S5
3EQEQESESETEQ
4IC2IC1IC2
5Rule 1Rule 2Rule 3Rule 4Rule 5Rule 6Rule 7Rule 8
630,AH,EQ,MC,P2,PT,RF,S2,SN,T,ZM,ZN,10000008
Sheet2
 

Watch MrExcel Video

Forum statistics

Threads
1,122,469
Messages
5,596,316
Members
414,053
Latest member
Dual Showman

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
Top