VLookUP type but reverse substring Matching

Mitesh9

New Member
Joined
Feb 8, 2014
Messages
4
I have data in 2 Columns.
A: Addresses
B: List Of Different Areas

Column A will be much much longer (more cells/rows) than column B.

Like this:

[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]opp-don bosco school,jivraj park
[/TD]
[TD]Shyamal[/TD]
[/TR]
[TR]
[TD]pearl apartments, opp. shakti school, near shyamal cross roads, satellite
[/TD]
[TD]Ramdevnagar[/TD]
[/TR]
[TR]
[TD]orcid park , b/h shalby hospital ramdevnagar,ahmedabad.
[/TD]
[TD]Jivraj[/TD]
[/TR]
[TR]
[TD]i-404 kala residency, times of india press road Shyamal
[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]











I want Column C to be filled with such a formula, that will look up into each entry of Column A, and find if any area from Column B (Area List) is part of the full address. If it is, it will put the area name in that cell of C, else it will keep it blank.

The result should be like this:

[TABLE="class: grid, width: 800, align: left"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]opp-don bosco school,jivraj park[/TD]
[TD]Shyamal[/TD]
[TD]Jivraj[/TD]
[/TR]
[TR]
[TD]pearl apartments, opp. shakti school, near shyamal cross roads, satellite[/TD]
[TD]Ramdevnagar[/TD]
[TD]Shyamal[/TD]
[/TR]
[TR]
[TD]orcid park , b/h shalby hospital ramdevnagar, ahmedabad.[/TD]
[TD]Jivraj[/TD]
[TD]Ramdevnagar[/TD]
[/TR]
[TR]
[TD]i-404 kala residency, times of india press road[/TD]
[TD][/TD]
[TD]Shyamal
[/TD]
[/TR]
</tbody>[/TABLE]









I hope I have mentioned this problem clearly enough.

Basically, this is like reverse VLookup. I want to find if any of the word from column B appears in individual cells of Column A, and if it does, I want to put that word in Column C in respective row.

Thank you for your time...
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Hi and welcome to the forum,

The result in C4 of your example doesn't look right, but perhaps try something like this:


Excel 2013
ABC
1opp-don bosco school,jivraj parkShyamalJivraj
2pearl apartments, opp. shakti school, near shyamal cross roads, satelliteRamdevnagarShyamal
3orcid park , b/h shalby hospital ramdevnagar, ahmedabad.JivrajRamdevnagar
4i-404 kala residency, times of india press road#N/A
Sheet1
Cell Formulas
RangeFormula
C1=LOOKUP(2, 1 / SEARCH(B$1:B$3, A1), B$1:B$3)
 
Upvote 0
circledchicken,

Thank You for Welcoming me and a Quick Response. I had been struggling with this for hours.

You are right. There was problem with the data I posted. It was copy/paste error.

Your solution is very elegant. It works for me as I expected to.

Many thanks.
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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