VLOOKUP and using a Name in the col_index_num

  • Thread starter Thread starter Beans
  • Start date Start date
B

Beans

Hi, I am using the VLOOKUP function.

VLOOKUP(lookup_value,table_array,col_index_num,range_lookup)

I was wondering if anyone had any success in substitution a name vs the
number of the col_index_num. The reason I ask is I need to add a column to
the spreadsheet that I am evaluating with the VLOOKUP function, and when I
do, I have to redo all the vlookup col_index_num values as they are now
pointing to the wrong column.

Thanks
 
Beans said:
Hi, I am using the VLOOKUP function.

VLOOKUP(lookup_value,table_array,col_index_num,range_lookup)

I was wondering if anyone had any success in substitution a name vs the
number of the col_index_num. The reason I ask is I need to add a column to
the spreadsheet that I am evaluating with the VLOOKUP function, and when I
do, I have to redo all the vlookup col_index_num values as they are now
pointing to the wrong column.

Thanks

See if this helps.

http://www.contextures.com/xlFunctions03.html#IndexMatch
 
If you have descriptive column headers you can use the MATCH function.

...........A..........B..........C
1..................2008....2009
2........x..........28........33
3........y..........44........30
4........z..........17........22

Lookup y for 2009

E1 = y
F1 = 2009

=VLOOKUP(E1,A1:C4,MATCH(F1,A1:C1,0),0)
 
Back
Top