Fuzzy match on google sheets

不羁岁月 提交于 2019-12-05 23:01:45

Old thread but, in case you find yourself here, search for my Google Sheets add-on called Flookup. It should do exactly what you want.

For this case, you can use this function:

Flookup (lookupValue, tableArray, lookupCol, indexNum, threshold, [rank])

The parameter details are:

  1. lookupValue: the value you're looking up
  2. tableArray: the table you want to search
  3. lookupCol: the column you want to search
  4. indexNum: the column you want data to be returned from
  5. threshold: the percentage similarity below which data shouldn't be returned
  6. rank: the nth best match (i.e. if the first one isn't to your liking)

*You can find out more at the official website (examples and such).

Please note that, whereas the OP appears to want the whole list of possible matches, Flookup will only return one result at a time.

In Google sheets there are a few powerful 'regex' formulas.

Suppose, you have ID list in column A, and URL list in column B

Then use formula:

=REGEXEXTRACT(B1,JOIN("|",$A$1:$A$3))

It will match one of ID's. Drag the formula down to see the result as in picture above.

See more info here

Ed Nelson

Try the following. I am assuming the product codes are in Sheet1 and the URLs are in Sheet2. Both in column A:

=iferror(transpose(FILTER(Sheet2!$A$2:$A,Search("*"& A2 &"*",Sheet2!$A$2:$A))))

Copy down.

If you want to show the image instead of the url try:

=arrayformula(image(iferror(transpose(FILTER(Sheet2!$A$2:$A,Search("*"& A2 &"*",Sheet2!$A$2:$A))))))
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!