Excel Approximate Text Match [closed]

久未见 提交于 2019-12-19 20:48:57

问题


I'm trying to check how many strings in column A approximately match a string in column B.

Example:

If I have the string "angry_birds_iph_app" in column B, and "angry_birds_iph_app" and "angry_birds_adrd_app" appear somewhere in column A, I would like the function to return 2.


回答1:


Take a look at the Excel Fuzzy Lookup add-in. It is free to download from Microsoft. The tool implements the Levenshtein edit distance algorithm to return a similarity score between rows. Among other customizable features, the tool also allows you to set a threshold for how well the values must match in order to return the approximate result.

Rather than returning the count like you mentioned, the tool will return a table with the most similar match in column A relative to each entry in column B. From there you could simply use a filter and perform a count on the resulting column.

http://www.microsoft.com/en-us/download/details.aspx?id=15011




回答2:


In addition to the Excel Fuzzy lookup add-in, there is another add-in (also a free download) that provides a couple functions that may be helpful. One is pwrVLOOKUP and provides a fuzzy vlookup capability. The other is pwrSIMILARITY and would give you a similarity score (between 0 and 1) from which you can base your matching within your worksheet. The PowerUps add-in for Excel works in Excel 2003 thru 2013.

An example is posted on the page here: Example Demo



来源:https://stackoverflow.com/questions/14821345/excel-approximate-text-match

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!