在excel中查找3个不同列中的值

时间:2022-03-19 15:45:38

Where county name in column A matches county name in column E, how can I write a formula in excel that would place the corresponding county ID from column F in cell B2?

如果A列中的县名与E列中的县名匹配,我如何在excel中编写一个公式,该公式会在单元格B2中的F列中放置相应的县ID?

3 个解决方案

#1


0  

If you need to look it up, it would be a VLOOKUP like so:

如果你需要查找它,它将是一个像这样的VLOOKUP:

=IF(COUNTIF(E:E,A2)>0,VLOOKUP(A2,E:F,2,FALSE),"")

#2


0  

I'm not sure I understand how your data is organized, but if you just want to check for equality (within a row) of Col. A and Col. E, returning the value in F if the values match, then a simple =IF(Condition, Result if True, Result if False) should work:

我不确定我是否理解你的数据是如何组织的,但是如果你只想检查Col.A和Col.E的相等(在一行内),如果值匹配则返回F中的值,那么一个简单的= IF(条件,结果如果为真,结果如果为假)应该起作用:

=IF(A1 = E1, F1, "")

= IF(A1 = E1,F1,“”)

#3


0  

One possible way would be to add a fourth column, let's say X, with formulas like =IF($A1=$E1;1;0) And then in B2 you use a simple lookup to find the 1-value: =LOOKUP(1;X2:X8;F2:F8)

一种可能的方法是添加第四列,比方说X,使用公式如= IF($ A1 = $ E1; 1; 0)然后在B2中使用简单查找来查找1值:= LOOKUP( 1; X2:X8; F2:F8)

#1


0  

If you need to look it up, it would be a VLOOKUP like so:

如果你需要查找它,它将是一个像这样的VLOOKUP:

=IF(COUNTIF(E:E,A2)>0,VLOOKUP(A2,E:F,2,FALSE),"")

#2


0  

I'm not sure I understand how your data is organized, but if you just want to check for equality (within a row) of Col. A and Col. E, returning the value in F if the values match, then a simple =IF(Condition, Result if True, Result if False) should work:

我不确定我是否理解你的数据是如何组织的,但是如果你只想检查Col.A和Col.E的相等(在一行内),如果值匹配则返回F中的值,那么一个简单的= IF(条件,结果如果为真,结果如果为假)应该起作用:

=IF(A1 = E1, F1, "")

= IF(A1 = E1,F1,“”)

#3


0  

One possible way would be to add a fourth column, let's say X, with formulas like =IF($A1=$E1;1;0) And then in B2 you use a simple lookup to find the 1-value: =LOOKUP(1;X2:X8;F2:F8)

一种可能的方法是添加第四列,比方说X,使用公式如= IF($ A1 = $ E1; 1; 0)然后在B2中使用简单查找来查找1值:= LOOKUP( 1; X2:X8; F2:F8)