如何通过部分关键字进行匹配分类
想知道是否能用公式,使B列通过A列识别G列的部分关键词,靠GH列匹配的数据填充B列,达到D和E列最后的匹配效果求大神指点,非常感谢
=VLOOKUP(LEFT(A2,3)&"*",G:H,2,) =LOOKUP(1,0/FIND(G$2:G$18,A2),H$2:H$18) =VLOOKUP(LEFT(A2,FIND("区",A2)),$G$2:$H$18,2,) 这样子? 感谢,这个能达到需求 =IFERROR(VLOOKUP(LEFT(A2,3)&"*",G:H,2,0),"") 这比较容易提取到 #在这里快速=VLOOKUP(LEFT(A2,FIND("区",A2)),$G$2:$H$18,2,0)回复# Sub test()
Dim arr, brr, i, k
arr = Sheet2.Range("a1:b27")
brr = Sheet2.Range("G1:H17")
For i = LBound(arr) To UBound(arr)
For k = LBound(brr) To UBound(brr)
If arr(i, 1) Like "*" & brr(k, 1) & "*" Then
arr(i, 2) = brr(k, 2)
End If
Next k
Next i
.Resize(UBound(arr), 2) = arr
End Sub =LOOKUP(,-FIND($G$2:$G$18,A2),$H$2:$H$18)
页:
[1]