Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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?

Sample value:

Screenshot for Sheet1:

enter image description here

Screenshot for VLookup enter image description here

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
181 views
Welcome To Ask or Share your Answers For Others

1 Answer

Correct your vlookup to :

=VLOOKUP(H2,C2:D128,2, FALSE)

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))

You can see the ranges defined in comparison to the vlookup, ie column D has the result, Column C the target... See: enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...