具有精确和近似匹配的vlookup的替代方案不起作用

时间:2016-07-01 15:34:42

标签: excel excel-vba excel-formula vlookup string-matching vba

Cell A1: 0553400710 
Cell A2: John
Cell B1: ['0553400710', '0553439406']

注意:

  1. 列表项Cell B1的格式为['number','number,'number',...... ]
  2. A1和A2是用户输入值
  3. 我希望将Cell A1中的0553400710与Cell B1中的['0553400710','0553439406']相匹配。

    如果匹配,我想返回A2:John。

    有可能吗?

    顺便说一句,Vlookup无法正常工作。我正在寻找一些利用固定格式

    的优势的技术

    图1:这是我试过的公式

    Formula

    图2:这是vlookup显示错误值的表

    enter image description here

    图3:这是vlookup检查的数组

    enter image description here

2 个答案:

答案 0 :(得分:2)

通过叙述中的示例数据(和参考)并忽略图像,一个简单的通配符就足够了。

=IFERROR(INDEX(A:A, MATCH("*"&A1&"*",B:B, 0)+1), "")

wildcard_match

答案 1 :(得分:0)

您尝试过索引/匹配吗?

=指数(return_range,匹配(cell_to_match,range_to_match,0))

相关问题