Formula to find words in list of text data

metsmaniac

Board Regular
Joined
Jan 29, 2010
Messages
57
Office Version
  1. 365
Platform
  1. Windows
I have a long list of rows of text data, each about 30 characters long.

I want to create a formula that finds words in the data from a separate list of words. The "find" function searches the text list one word at a time. I'm trying to search the list using a list of all the words I'm looking for.

I'd rather use a compound formula than Visual Basic.

For example, my word list could be color names:
Red
Blue
Yellow
Green
Etc.

I want to search the data list & identify rows that contain any of the color names.
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Here is a simple answer. I'm not sure if your task is more complex:

Book1
ABCD
1ListWord to FindWord Found
2BlueTRUE
3Red
4Blue
5Yellow
6Green
Sheet1
Cell Formulas
RangeFormula
D2D2=ISNUMBER(MATCH(C2,A3:A6,0))
 
Upvote 0
When you say fine, a word in a data set or all of the words in one cell?
Or are they a long list in one column?

And when you say find, do you simply want to highlight the words or pull some data from another column associated with that word?
 
Upvote 0
I want to identify the text row that contains any of the words in the separate list.

For example, if a row in the data list reads "sfkldjfksj Red 5809485098", and "Red" is one of the colors in a separate list of colors, I want to somehow identify the row in the data list that contains the word "Red".
 
Upvote 0
try this, formula in D8:

this just says its there somewhere. Knowing your excel version will help with a solution for WHERE.
Please update your profile so the forum doesn't have to ask.

Book1
ABCDEF
1ListWord to FindWord Found
2BlueTRUE
3Red
4Blue
5YellowFind Word In Part of cell
6Green
7Red WhiteWord to findWord Found
8Red White and BlueBlueTRUE
9Blue and Red(May need to enter with CSE keystroke)
10Yellow is not Green
Sheet1
Cell Formulas
RangeFormula
D2D2=ISNUMBER(MATCH(C2,A3:A10,0))
D8D8=SUM(--(ISNUMBER(FIND(C8,$A$3:$A$10))))>0
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Here is a formula that may work. You must have a version that works with array formulas (just like the last one) and input using the CSE key stroke.
It may be fickle as it uses ROW and ROWS functions to and results may change if you move your formulas and data around.

Book1
ABCDE
1ListWord to FindWord Found
2BlueTRUE
3Red
4Blue
5YellowFind Word In Part of cell
6Green
7Red WhiteWord to findWord Found
8Red White and BlueBlueTRUE
9Blue and Red(May need to enter with CSE keystroke)
10Yellow is not Green
11
12Word to findFirst Text Found
13BlueBlue
Sheet1
Cell Formulas
RangeFormula
D2D2=ISNUMBER(MATCH(C2,A3:A10,0))
D8D8=SUM(--(ISNUMBER(FIND(C8,$A$3:$A$10))))>0
D13D13=INDEX($A$3:$A$10,1/LARGE(IFERROR(1/(ISNUMBER(FIND(C8,$A$3:$A$10))*(ROW($A$3:$A$10)-ROWS(D13:D14))),0),1))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Thanks for the responses.

I use Microsoft Office 365, and I've updated my profile with that info.

To clarify, I need a formula in column Q that returns "Yes" if ANY of the words in column S are within each row of column P. Otherwise, the formula returns "No".
I've provided an example below:

Example.JPG
 
Last edited:
Upvote 0
See this link and answer from Peter_SSs

Book4
ABCD
1
2DataIn ListFind
3Red and QrangeYesRed
4Red and VioletYesOrange
5Blue and carYesYellow
6City and StateNoGreen
7Purple and AquaYesBlue
8Redo this colorNoPurple
9Orange and DogYesBlack
10DogNoWhite
Sheet1
Cell Formulas
RangeFormula
B3:B10B3=IF(COUNT(SEARCH(" "&$D$3:$D$10&" "," "&A3&" "))>0,"Yes","No")
 
Upvote 0
Solution
You're welcome. Have to give most of the credit to Peter. Thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,073
Messages
6,122,975
Members
449,095
Latest member
Mr Hughes

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