0

I am trying to use :

VLOOKUP to get the value of the ID colum in the below image :

enter image description here

The formula returns #N/A error although the value exists!

The formula I am using is :

=VLOOKUP(J13,$C$2:$D$10,1,FALSE)

Need help resolving this please. Thanks.

wfareed
  • 139
  • 2
  • 17
  • Use INDEX/MATCH. For VLOOKUP, the value must exist in the *leftmost* column of the lookup table. That is not the case here (i.e. Wael Fareed does not exist in column C). – BigBen Dec 04 '21 at 20:08
  • @BigBen I am using col_index_num 1 which is the ID column for the table_array !? – wfareed Dec 04 '21 at 20:11

1 Answers1

1

Use index() with match(). Vlookup() only works to the right of the indexing column.

So:

=index(C2:C10,match(J13,D2:D10,0))

Or you could do the lazy solution of swapping col C with Col D, but other formulae you have may then fail...

Solar Mike
  • 7,156
  • 4
  • 17
  • 32