Fuzzy Logic? Partial match to retrieve values from separate table

maxormark

New Member
I have two sheets in Excel 2013: One contains more than 200 Brandnames, plus their importance on an increasing scale starting at 1, plus a category. The second sheetcontains more than 13,000 keyword phrases, which may – or may not – contain the Brandnames in the first table.

What I want to do is to use a sort of VLOOKUP() statement to search Sheet 1 for each of the 13,000 keywords in Sheet 2 and – if it finds a partial match – return the Importance and Category.

For example ...
Keyword = "Ralph Lauren kids";
Brand = "Ralph Lauren"
Brand-Importance = "124"
Brand-Category = "Fashion"

Result for "Ralph Lauren kids"
Keyword-Importance = "124"
Keyword-Category = "Fashion"

Because the actual numbers of results are too large to show here, I've created a test book to show the actual problem.

Sheet1

Sheet2

In a perfect world, the end result should be ...

Sheet2

I found what I believed was a solution elsewhere on this forum; however, despite modifying the formula given there for Sheet2/C7 to read ...

Code:
``=IF(ISNA(LOOKUP(10^10,FIND(Sheet2!\$A\$1:\$C\$17,A7),Sheet2!\$B\$2:\$B\$6)),"",LOOKUP(10^10,FIND(Sheet2!\$A\$2:\$A\$6,A7),Sheet2!\$B\$2:\$B\$6))``

... it still doesn't work.

I've also run it past our office Excel guru and he's stumped too, so I'm wondering if this really is a solution after all.

I'd be grateful for any help. I could do it manually, but 13,000 lines of updates is a very long weekend.

m

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

MrExcel MVP
Would you post the samples in a form that is readable directly into Excel? Images don't afford that action.

István Hirsch

Well-known Member
Give these formulas a try, enter them with Shift-Ctrl-Enter in

F2:
=IFERROR(INDEX(\$B\$2:\$B\$17,MATCH(TRUE,ISNUMBER(SEARCH(\$A\$2:\$A\$17,E2)),0)),"")

G2:
=IFERROR(INDEX(\$C\$2:\$C\$17,MATCH(TRUE,ISNUMBER(SEARCH(\$A\$2:\$A\$17,E2)),0)),"")
Excel Workbook
ABCDEFG
1BrandBRCategoryKeywordBRCategory
2Nike1Sportkids designer clothes
4Stella Mccartney Kids3Fashionralph lauren5Fashion
5Bogner3Sportpetit bateau
6Mayoral4Fashionkids clothes
7Poivre Blanc4Sportralph lauren kids5Fashion
8Ralph Lauren5FashionPoivre Blanc4Sport
9Lacoste5Sport
10Ugg6Fashion
11Boss7Fashion
12Nike Golf61Sport
13Globe62Sport
14Oakley63Sport
15Giro64Sport
16Ariat65Sport
Sheet

MrExcel MVP
Would you post the samples in a form that is readable directly into Excel? Images don't afford that action.

Here is one method: Borders-Copy-Paste, if you are given the chance of course.

Sheet2, B2, just enter, copy across to C2, and down:

=IFERROR(LOOKUP(9.99999999999999E+307,SEARCH(Sheet1!\$A\$2:\$A\$17,\$A2),Sheet1!B\$2:B\$17),"")

maxormark

New Member
This works perfectly. And I've been able to slot it seamlessley into the bigger project too.

Many thx

m

Replies
1
Views
194
Replies
0
Views
98
Replies
5
Views
262
Replies
3
Views
141
Replies
7
Views
203

1,181,863
Messages
5,932,506
Members
436,841
Latest member
Jonny99333

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.

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

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