简体   繁体   English

Excel公式_匹配

[英]Excel Formula_Matching

I am trying to build an excel formula, that will reference another column based off of the first word.我正在尝试构建一个 excel 公式,它将引用基于第一个单词的另一列。 The first word does not need to have an exact match, it will however, need to find words that are “very similar” to each other.第一个单词不需要完全匹配,但是,它需要找到彼此“非常相似”的单词。 If the words, are not a close match, I would need the original cell to show in the results tab (as seen below).如果单词不是紧密匹配,我需要原始单元格显示在结果选项卡中(如下所示)。 I would need the excel formula to do the following:我需要excel公式来执行以下操作:

Column A......….Column B (with desired info)......….Column C (results) A列........ B列(具有所需信息)........ C列(结果)

Upper Body...……….Upper...………………......………………......……Upper上半身………………上…………………………………………………………上


Upper Arms...…………….....………………......………………......…… Upper上臂……………………………………………………………………………… 上臂


Upper Legs...…………….....………………......………………......…… Upper大腿……………………………………………………………………………………


Lower Legs...…………….....………………......………………......…… Lower Legs小腿…………………………………………………………………………………… 小腿

I have tried, the VLookup with the range lookup, as “True”, however the above example will be a lot more complex, with the real data set I am using.我已经尝试过,带有范围查找的 VLookup 为“True”,但是上面的示例会复杂得多,使用的是我正在使用的真实数据集。 Any help would be greatly appreciated.任何帮助将不胜感激。

You can extract first word and then use Index() and Match().您可以提取第一个单词,然后使用 Index() 和 Match()。

You will first need to get the first word of column A. You can do this by splitting column A by a delimiter (split after first space) or by using a formula.您首先需要获取 A 列的第一个单词。您可以通过使用分隔符(在第一个空格后拆分)或使用公式来拆分 A 列来实现此目的。

Formula example: =IF(ISERR(FIND(" ",A2)),"",LEFT(A2,FIND(" ",A2)-1)) where A2 is the cell you are looking at.公式示例: =IF(ISERR(FIND(" ",A2)),"",LEFT(A2,FIND(" ",A2)-1)) 其中 A2 是您正在查看的单元格。

When you have that value you can then use =Index(Match()) to look up value.当您拥有该值时,您可以使用 =Index(Match()) 来查找值。 Match allows for fuzzy matching as long as you do not set the last parameter to 0.只要您不将最后一个参数设置为 0,Match 就允许进行模糊匹配。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM