VLOOKUP and using a Name in the col_index_num

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
 
G

Glenn

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
 
T

T. Valko

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top