Aug 25 2022 03:13 AM
Good day,
I have spend probably too long trying to figure out this problem. In Sheet 1 there is a list of Brands:
BRAND |
RUWAG |
ZEBRA |
EASIGAS |
AFROX |
LIBERTY |
MTS |
In Sheet two I have a list of products with brands located in various positions in the text string:
PRODUCT DESCRIPTION |
ZebraLABELS 100MM X 30MM C40 GREEN |
EASIGAS GAS LP 19KG |
AFROX CYLINDER / DEPOSIT 19KG |
SCREW EYE LIBERTY NO.04 BP |
SCREW EYE EIFEL NO.04 BP |
MTS BOLT ANCHOR 10X75 16MM DR |
THREADED ROD GALV 20MM RUWAG |
The problem comes in when I need to populate the brands matching in Sheet 1 in Column B of Sheet 2 containing the Products next to the corresponding product. The desired outcome should look like this:
PRODUCT DESCRIPTION | BRAND |
ZebraLABELS 100MM X 30MM C40 GREEN | ZEBRA |
EASIGAS GAS LP 19KG | EASIGAS |
AFROX CYLINDER / DEPOSIT 19KG | AFROX |
SCREW EYE LIBERTY NO.04 BP | LIBERTY |
SCREW EYE EIFEL NO.04 BP | No MATCH |
MTS BOLT ANCHOR 10X75 16MM DR | MTS |
THREADED ROD GALV 20MM RUWAG | RUWAG |
How ever the formula to do this is eluding me. Any ideas?
Aug 25 2022 03:31 AM
@DaanvdM Have a look at the attached file. I used structured tables. Then the location of them doesn't matter.
Aug 25 2022 03:44 AM
@DaanvdM If you are on Microsoft-365 then can try below formula.
=FILTER($A$2:$A$7,ISNUMBER(SEARCH($A$2:$A$7,D2)),"No Match")
For array approach can try BYROW() lambda function.
=BYROW(D2:D8,LAMBDA(x,FILTER($A$2:$A$7,ISNUMBER(SEARCH($A$2:$A$7,x)),"No Match")))
Aug 31 2022 06:04 AM
Thank you @Riny_van_Eekelen and @Harun24HR @. Looks like the formula of @Riny_van_Eekelen is the closest to our desired outcome. There is, however, a snag. The formula matches partial matches as well. Let's say the description is Easigas and there are both the Easi and Easigas brands. It matches the first from the top, not necessarily the best match
Aug 31 2022 07:20 AM
@DaanvdM That's quite a collection of descriptions and brand names you have there. Many don't seem to be related to any brand name to begin with. Like "EXPANSION BOLT 5X50MM" or "EYELET BRASS".
I've played around a bit with PowerQuery and fuzzy matching, but the end result isn't very promising. With a rather low threshold, PQ matches just under 3000 thousand (out of 18000+) descriptions and many of them are obviously very wrong.
Can you explain what you actually want to get out of this exercise?