Vlookups - Order of Columns

Soldato
Joined
26 Aug 2005
Posts
6,884
Location
London
Is it possible to do a vlookup on a table where the col_index_number is the last column but you want to return a column before it?

j7zr7q.jpg
 

Pho

Pho

Soldato
Joined
18 Oct 2002
Posts
9,325
Location
Derbyshire
Code:
=INDEX($A$7:$A$9,MATCH(A2,$B$7:$B$9,0))

Which is:

Code:
MATCH(A2,$B$7:$B$9,0)
Tells you which row of your array (B7:B9) the value A2 exists in.

Code:
=INDEX($A$7:$A$9,MATCH(A2,$B$7:$B$9,0))
Reads the row of your description array (A7:A9) where the match was



BTW you should use $A$6:$B:$9 for the VLOOKUP range - if you don't put the dollar in then when you drag the formula down excel auto-increments the numbers. Line 4 is doing a lookup from A8:B11!
 
Back
Top Bottom