Search & Find String of Words

flds

Board Regular
Joined
Jun 19, 2008
Messages
78
Office Version
  1. 2021
Platform
  1. Windows
Hello,
I am looking to create a formula.
My requirement is, I have over 1200 rows of data and filling up. I am trying to match text. I have text in column A & B. I need the same string of words contained in Col 'B', to match in Col 'A'. (String of words in Col 'A' could be long in some rows). Return "Yes" or "No" in Col 'C', on same row as match found in Col 'A'.
Hope I am clear in my requirement.

I googled and tried these formulas, and failed

"IFERROR(IF(MATCHif("*"&B1&"*",A:A,0),"yes",),"no")"

"IF(COUNTIF(A:A, "*"&$B$1&"*"), "Yes", "")"

Your help would be greatly appreciated. Thanks
 
I modified the D2 formula =IF(ISNUMBER(SEARCH(" "&B1&" "," "&A2:A23&" ")),"Yes","No") I added the asterisk "*"&B1&"*". This gives me the search for multiple words.
Perhaps I am not understanding exactly what you are trying to do or how you modified the formula, but as I understood the requirement my existing formula already finds a multiple word string and your modification might stop the formula looking for words and find text strings instead.
Below I have used my existing formula in D2 and what I think your modification is in E2 and you will see in row 10 that your formula has found the text string "one two three" but not the words "one two three"

If I have misunderstood, to help me understand, could you please post your exact modified D2 formula, an example of the B1 value and one example from column A where your modified formula gives you what you want and my existing one does not?

flds.xlsm
ABDE
1Textone two threeWord match
2one two three fourYesYes
3onetwothreeNoNo
4one two threeYesYes
5zero one two threeYesYes
6one three twoNoNo
7NoNo
8five sixNoNo
9zero one zero two zero three zeroNoNo
10twentyone two threeNoYes
Match text (2)
Cell Formulas
RangeFormula
D2:D10D2=IF(ISNUMBER(SEARCH(" "&B1&" "," "&A2:A10&" ")),"Yes","No")
E2:E10E2=IF(ISNUMBER(SEARCH("*"&B1&"*"," "&A2:A10&" ")),"Yes","No")
Dynamic array formulas.
 
Upvote 0

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

Forum statistics

Threads
1,224,802
Messages
6,181,054
Members
453,014
Latest member
Chris258

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