检查列中的另一个工作表上是否存在 excel 单元格 - 并返回不同列的内容 [英] Check if an excel cell exists on another worksheet in a column - and return the contents of a different column
本文介绍了检查列中的另一个工作表上是否存在 excel 单元格 - 并返回不同列的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想要做的是说单元格 D3
(在当前工作表上)的内容是否存在于第一个工作表的 A
列中(在我的情况下为标题列表)).(而且它们总是存在于某处).返回 Column 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))
如何修正公式?
推荐答案
您可以使用以下公式.
对于 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
中使用List!A:C
并从第 №3
列返回值 - 我使用
VLOOKUP
的第 4 个参数等于FALSE
,在这种情况下VLOOKUP
只会找到完全匹配的值,并且值在List!A:C
的第一列中,不需要排序(与使用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屋!
查看全文