find partial match of string between two arrays

codingchemist

New Member
Joined
Jun 29, 2018
Messages
2
I have two arrays. Array A has a list of multiple terms in a column such as this:
Urinary Bladder Cancer|Bladder Tumors|Transitional Cell Carcinoma of the Bladder|Malignant Melanoma|Melanoma|Skin Cancer|Carcinoma, Non-Small-Cell Lung|Lung Cancer
Platinum Sensitive Ovarian Cancer|Ovarian Cancer
Gastric Cancer

<tbody>
</tbody>

Array B has a list of single terms such as this:
Gastric Cancer
Ovarian Cancer
Bladder Cancer

<tbody>
</tbody>

I want to map the terms from Array B onto Array A. So, I want Array A to look like, with the terms from Array B included in it.
Urinary Bladder Cancer|Bladder Tumors|Transitional Cell Carcinoma of the Bladder|Malignant Melanoma|Melanoma|Skin Cancer|Carcinoma, Non-Small-Cell Lung|Lung CancerBladder Cancer
Platinum Sensitive Ovarian Cancer|Ovarian CancerOvarian Cancer
Gastric CancerGastric Cancer

<tbody>
</tbody>

Normally I would do an index match, but I need to find a partial match from Array A to Array B. Is there an easy way to do this?
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

Book1
ACD
1Gastric CancerUrinary Bladder Cancer|Bladder Tumors|Transitional Cell Carcinoma of the Bladder|Malignant Melanoma|Melanoma|Skin Cancer|Carcinoma, Non-Small-Cell Lung|Lung CancerBladder Cancer
2Ovarian CancerPlatinum Sensitive Ovarian Cancer|Ovarian CancerOvarian Cancer
3Bladder CancerGastric CancerGastric Cancer
Sheet1


In D1 enter and copy down:

=LOOKUP(9.99999999999999E+307,SEARCH(" "&$A$1:$A$3&"|"," "&$C1&"|"),$A$1:$A$3)
 
Upvote 0

Forum statistics

Threads
1,213,539
Messages
6,114,221
Members
448,554
Latest member
Gleisner2

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