Perform Reverse Simple Match

Bill Bisco

Active Member
Joined
Aug 8, 2007
Messages
446
Hi all,

Every Keyword has a route associated with it. I want to find out which description contains the keyword and then post the associated route for that keyword .

For example, Abrasive is associated with Route 22. I want to match the Description "Large Abrasive Tool" to the keyword Abrasive. and now in the same row as Large Abrasive Tool I want to post the associated route of the keyword contained within "Large Abrasive Tool" (which is Abrasive) which should be Route 22.

ABCD

<colgroup><col style="width: 25pxpx"><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: center"]Description[/TD]
[TD="align: center"]Keyword[/TD]
[TD="align: center"]Route[/TD]
[TD="align: center"]Route I want to Return[/TD]

[TD="align: center"]2[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFCC99]#FFCC99[/URL] , align: center"]Large Abrasive Tool[/TD]
[TD="align: center"]Tensile[/TD]
[TD="align: center"]87[/TD]
[TD="align: center"]22[/TD]

[TD="align: center"]3[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFCC99]#FFCC99[/URL] , align: center"]Small Cutting Scissors[/TD]
[TD="align: center"]Abrasive[/TD]
[TD="align: center"]22[/TD]
[TD="align: center"]45[/TD]

[TD="align: center"]4[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFCC99]#FFCC99[/URL] , align: center"]Difficult Tensile Instrument[/TD]
[TD="align: center"]Cutting[/TD]
[TD="align: center"]45[/TD]
[TD="align: center"]87[/TD]

[TD="align: center"]5[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFCC99]#FFCC99[/URL] , align: center"]Random Tool[/TD]
[TD="align: center"]Honing[/TD]
[TD="align: center"]21[/TD]
[TD="align: center"][/TD]

[TD="align: center"]6[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFCC99]#FFCC99[/URL] , align: center"]Small Abrasive Wheel[/TD]
[TD="align: center"]Drilling[/TD]
[TD="align: center"]11[/TD]
[TD="align: center"]22[/TD]

</tbody>
Sheet2

[TABLE="width: 85%"]
<tbody>[TR]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
It will be because of blank cells i believe. Does your range include blank cells?

You're right steve the fish, thanks! Blank cells do mess this up.

There's one more problem too because the second row with “Large Abrasive Tool” is getting fooled with our Keyword “e” and returning Route 4 when ideally we would want excel to return the best fit match, i.e. a match that contains the largest number of worded characters!

One has to be really careful not to have too few characters in the keyword or blanks, otherwise this seems pretty nice.

ABCD
DescriptionKeywordRouteRoute I want to Return
Large Abrasive ToolTensile
Small Cutting ScissorsAbrasive
Difficult Tensile InstrumentCutting
Random ToolHoning
Small Abrasive WheelDrilling
Examplee

<tbody>
[TD="align: center"]1[/TD]

[TD="align: center"]2[/TD]

[TD="align: right"]87[/TD]
[TD="align: right"]4[/TD]

[TD="align: center"]3[/TD]

[TD="align: right"]22[/TD]
[TD="align: right"]45[/TD]

[TD="align: center"]4[/TD]

[TD="align: right"]45[/TD]
[TD="align: right"]4[/TD]

[TD="align: center"]5[/TD]

[TD="align: right"]21[/TD]

[TD="align: center"]6[/TD]

[TD="align: right"]11[/TD]
[TD="align: right"]4[/TD]

[TD="align: center"]7[/TD]

[TD="align: right"]4[/TD]
[TD="align: right"]4[/TD]

</tbody>
Sheet with 7

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<tbody>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
[TR]
[TH="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]D2[/TH]
[TD="align: left"]=IFERROR(LOOKUP(10^100,SEARCH($B$2:$B$7,A2),$C$2:$C$7),"")[/TD]
[/TR]
[TR]
[TH="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]D3[/TH]
[TD="align: left"]=IFERROR(LOOKUP(10^100,SEARCH($B$2:$B$7,A3),$C$2:$C$7),"")[/TD]
[/TR]
[TR]
[TH="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]D4[/TH]
[TD="align: left"]=IFERROR(LOOKUP(10^100,SEARCH($B$2:$B$7,A4),$C$2:$C$7),"")[/TD]
[/TR]
[TR]
[TH="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]D5[/TH]
[TD="align: left"]=IFERROR(LOOKUP(10^100,SEARCH($B$2:$B$7,A5),$C$2:$C$7),"")[/TD]
[/TR]
[TR]
[TH="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]D6[/TH]
[TD="align: left"]=IFERROR(LOOKUP(10^100,SEARCH($B$2:$B$7,A6),$C$2:$C$7),"")[/TD]
[/TR]
[TR]
[TH="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]D7[/TH]
[TD="align: left"]=IFERROR(LOOKUP(10^100,SEARCH($B$2:$B$7,A7),$C$2:$C$7),"")[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
 
Last edited:
Upvote 0

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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