Forum Discussion

DaanvdM's avatar
DaanvdM
Copper Contributor
Aug 25, 2022

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

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

    • Riny_van_Eekelen's avatar
      Riny_van_Eekelen
      Platinum Contributor

      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?

  • Harun24HR's avatar
    Harun24HR
    Bronze Contributor

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

     

     

Resources