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
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
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)
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,730
Members
448,987
Latest member
marion_davis

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