检查列中另一个工作表上是否存在excel单元格,并返回不同列的内容 [英] Check if an excel cell exists on another worksheet in a column - and return the contents of a different column
本文介绍了检查列中另一个工作表上是否存在excel单元格,并返回不同列的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想做的是说,如果 D3
(在当前工作表中)的内容存在于 A
在第一个工作表(在我的情况下的标题列表)。 (他们总是存在于某个地方)。返回列 C
中相应行的内容。
What I want to do is to say if the contents of cell D3
(on current worksheet) exist in column A
in the first worksheet (in my case entitled list). (and they always do exist somewhere). Return the contents of the corresponding row in Column C
.
换句话说,如果匹配的单元格在行 12中找到
- 从 C12
。
In other words if the matching cell is found in Row 12
- return data from C12
.
我使用以下语法,但似乎无法让最后一部分正常工作。
I've used the following syntax but I can't seem to get the last part to work correctly.
=IF(ISERROR(MATCH(D3,List!A:A, 0)), "No Match", VLOOKUP(D3,List!A:A,1,TRUE))
如何修复公式? p>
How to fix the formula?
推荐答案
您可以使用以下公式。
对于Excel 2007或更高版本:
For Excel 2007 or later:
=IFERROR(VLOOKUP(D3,List!A:C,3,FALSE),"No Match")
对于Excel 2003:
For Excel 2003:
=IF(ISERROR(MATCH(D3,List!A:A, 0)), "No Match", VLOOKUP(D3,List!A:C,3,FALSE))
请注意,
- 我是在
VLOOKUP
中使用列表!A:C
并从列№3
- 我使用第四个参数
VLOOKUP
等于FALSE
,在这种情况下,VLOOKUP
只会找到完全匹配的值,而第一列中的值List!A:C
do not 需要排序(与使用的情况相反) TRUE
)。
- I'm using
List!A:C
inVLOOKUP
and returns value from column №3
- I'm using 4th argument for
VLOOKUP
equals toFALSE
, in that caseVLOOKUP
will only find an exact match, and the values in the first column ofList!A:C
do not need to be sorted (opposite to case when you're usingTRUE
).
这篇关于检查列中另一个工作表上是否存在excel单元格,并返回不同列的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文