Search Range For Text That Matches Part of String After Last Comma

djmyers

New Member
Joined
Dec 30, 2010
Messages
22
I am trying to match partial text in a string with text from a range on another sheet.

The text fragment in the string is usually found after the last comma. For example:
P38 Some Noise Text > Other Noise Text > 12-3456, 7890 Text I Want

The range on the other sheet (Sheet2!$B$2:$B$505) will sometimes contain ONLY this alphanumeric (7890 Text I Want) somewhere in the range, but more often it will be found in a non-matching string, usually at the beginning of the string. Example:
7890 Text I Want MA1309-054-055

I'm struggling to find a formula that will accomplish this. If the partial match is found, I'd like the formula to return the string fragment that matches (7890 Text I Want), or "no" if not found.
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

DanteAmor

Well-known Member
Joined
Dec 3, 2018
Messages
12,622
Office Version
  1. 2007
Platform
  1. Windows
Try this:

varios 12jul2020 filtervalues.xlsm
AB
1
2P38 Some Noise Text > Other Noise Text > 12-3456, 7890 Text I Want7890 Text I Want MA1309-054-055
3P38 Some Noise Text > Other Noise Text, > 12-3456, some textNo
Hoja6
Cell Formulas
RangeFormula
B2:B3B2=IFERROR(VLOOKUP("*"&TRIM(RIGHT(SUBSTITUTE(A2,",",REPT(" ",255)),255))&"*",Sheet2!$B$2:$B$600,1,0),"No")
 

DanteAmor

Well-known Member
Joined
Dec 3, 2018
Messages
12,622
Office Version
  1. 2007
Platform
  1. Windows
I'm glad to help you. Thanks for the feedback.
 

Watch MrExcel Video

Forum statistics

Threads
1,129,747
Messages
5,638,118
Members
417,010
Latest member
jnuss03

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