Extracting Exact word match with a pre-defined list into an new corresponding column

Copper Contributor

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 DESCRIPTIONBRAND
ZebraLABELS 100MM X 30MM C40 GREENZEBRA
EASIGAS  GAS LP 19KGEASIGAS
 AFROX CYLINDER / DEPOSIT 19KGAFROX
SCREW EYE LIBERTY NO.04 BPLIBERTY
SCREW EYE EIFEL NO.04 BPNo MATCH
MTS BOLT ANCHOR 10X75 16MM DRMTS
THREADED ROD GALV 20MM RUWAGRUWAG

 

How ever the formula to do this is eluding me. Any ideas?

4 Replies

@DaanvdM Have a look at the attached file. I used structured tables. Then the location of them doesn't matter.

 

@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")))

Harun24HR_0-1661424110401.png

 

 

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

@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?