Vlookupfind匹配
我想用我的ID匹配的string,我想用VLOOKUP来完成
=VLOOKUP(L2;Tree_Matchingnode!A:B;1;0)
我正在做Vlookup的表看起来像这样:
+----------------+------------------+ | Parent_TREE_ID | Parent_TREE_NAME | +----------------+------------------+ | 1 | | | 2 | | | 3 | | +----------------+------------------+
匹配tabel看起来像这样:
+-------------+----+ | Folder_PATH | ID | +-------------+----+ | Path1 | 1 | | Path3 | 9 | | Path15 | 3 | +-------------+----+
我的结果应该是从第一个表的ID匹配来自第二个表的正确path
我得到的结果是#N / A,这是错误的,L2将是Parent_TREE_ID
您只能通过VLOOKUP
获得右侧的列,而不是左侧。 而是使用INDEX-MATCH
因为它更加灵活:
代替:
=VLOOKUP(L2;Tree_Matchingnode!A:B;1;0)
使用类似于:
=INDEX(Tree_Matchingnode!A:A,MATCH(L2,Tree_Matchingnode!B:B,0),1)