如何在2组列上执行vlookup

时间:2014-07-09 12:28:21

标签: excel excel-formula

我必须错误检查电子表格,并确保col A和B的值出现在col C和D

离。

 Col A   Col B
   123    10
   456    11
   789    12

Col C   Col D
789      12     ----- this would be ok.. because the vaules show up in COL A And B
456      10     ------ this is not ok... this set of values does not show up in A And B

如何在不使用VBA的情况下执行此操作?

2 个答案:

答案 0 :(得分:0)

COL A1 = 123, COL B1 = 10, COL C1 = 789, COL D1 = 12
COL A2 = 456, COL B2 = 11, COL C2= 456, COL D2 = 10
COL A3 = 789, COL B3 = 12, 

在Col E1中使用以下公式

=IF(VLOOKUP(C1,$A$1:$B$3,2)=D1,"TRUE","FALSE")

答案 1 :(得分:0)

一种简单的方法是添加辅助列以连接A&amp; A; B.然后你要连接D&amp; E并查找辅助列。 所以你的数据如下,公式= IF(ISERROR(VLOOKUP(D1&amp; E1,$ C $ 1:$ C $ 3,1,FALSE)),&#34; BAD&#34;,&#34; GOOD&#34;)< / p>

enter image description here

相关问题