VLookUp值到另一个工作表 [英] VLookUp value to another worksheet
问题描述
我需要获取Lookup表中相应项目的值.但是,我的输出结果为N/A.在工作表1中,我需要使用H列作为查找值,然后使用ColumnC在VLookup工作表或Table2中引用它,相应的值应在ColumnD中获得该值.我使用了以下代码:
I need to get the value of the corresponding item in Lookup table. But, I am getting N/A in my output. In worksheet1, I need to use column H as a lookup value then reference it in VLookup sheet or Table2 using ColumnC, the corresponding value should get the value in ColumnD. I used this code:
=VLOOKUP(H2, Table2, 4, FALSE)
我的代码有什么问题吗?
Is there something wrong in my code?
样本值:
Sheet1的屏幕截图:
Screenshot for Sheet1:
VLookup的屏幕截图
Screenshot for VLookup
推荐答案
将您的vlookup修改为:
Correct your vlookup to :
=VLOOKUP(H2,C2:D128,2, FALSE)
或将Table3定义为c2:D128 ... 和:
Or define Table3 as c2:D128... and:
=VLOOKUP(H2, Table3, 4, FALSE)
要进入索引&匹配路线,它确实具有优势,数据不必位于同一区域甚至同一张纸上,我建议:
To go the index & match route and it does have advantages, that the data does not have to be in the same area or even on the same sheet, I would suggest:
=index(sheet_name!D2:D128,MATCH(H2,sheet_name!C2:C128,0))
您可以看到与vlookup相比定义的范围,即列D具有结果,列C具有目标... 看:
You can see the ranges defined in comparison to the vlookup, ie column D has the result, Column C the target... See:
这篇关于VLookUp值到另一个工作表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!