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

djmyers

New Member
Joined
Dec 30, 2010
Messages
27
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

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

DanteAmor

Well-known Member
Joined
Dec 3, 2018
Messages
14,823
Office Version
  1. 2010
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
14,823
Office Version
  1. 2010
Platform
  1. Windows
I'm glad to help you. Thanks for the feedback.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,567
Messages
5,838,146
Members
430,531
Latest member
pmisner

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