Find instances of substrings in a List of strings

tony.rugbyfan

New Member
Joined
Nov 10, 2010
Messages
5
I have a master list of top keywords, and I want to search for variations of them in the remaining list of keywords.

Top Keyword List ------------ Remaining List
tall trees------------------------- fast blue cars
blue cars------------------------blue cars online
--------------------------------------trees grow tall
--------------------------------------grow tall trees
--------------------------------------blue cars rock
--------------------------------------really blue cars
--------------------------------------green tall trees

What I need is a formula that I can copy down next to the Remaining List, which checks if each of the values contains any of the substrings in the Top Keyword List, it can give a value of 1 or the substring etc

Maybe VBA is needed? Any help much appreciated..
 

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"
Try eg in B2 copied down:

=SUMPRODUCT(--(ISNUMBER(SEARCH(A$2:A$3,B2))))>0

which will return TRUE if the cell contains one of the phrases in A2:A3.
 
Upvote 0
Can you give some expected results?

Would grow tall trees be a match with keyword tall trees? As they are not in the same order?
 
Upvote 0
Try eg in B2 copied down:

=SUMPRODUCT(--(ISNUMBER(SEARCH(A$2:A$3,B2))))>0

which will return TRUE if the cell contains one of the phrases in A2:A3.
This seems to be working as I needed, many thanks....

I just now need to figure out how it is working!
 
Last edited:
Upvote 0
Can you give some expected results?

Would grow tall trees be a match with keyword tall trees? As they are not in the same order?

hi schielrn,

the "trees grow tall" cell does not contain the phrase in the same order so I would be expecting false to be returned.

However, if it were possible to match the phrase even if it was not in the same order, then that would definitely eliminate a lot of work too.....
 
Upvote 0

Forum statistics

Threads
1,224,606
Messages
6,179,865
Members
452,948
Latest member
UsmanAli786

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