ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   vlookup with variable col_index_num (https://www.excelbanter.com/excel-worksheet-functions/88900-vlookup-variable-col_index_num.html)

0-0 Wai Wai ^-^

vlookup with variable col_index_num
 

VLOOKUP(lookup_value,table_array,col_index_num,ran ge_lookup)

Since my table is subject to constant change, I would like to know how to create
a variable col_index_num which will look up the right column itself, eg look for
the column heading which contains the word "list" & return its col_index_num.
Thanks for your help.



Ardus Petus

vlookup with variable col_index_num
 
If your column headers are in B1:H1
=MATCH("list",$B$1:$H$1,0)

HTH
--
AP

"0-0 Wai Wai ^-^" a écrit dans le message de news:
...

VLOOKUP(lookup_value,table_array,col_index_num,ran ge_lookup)

Since my table is subject to constant change, I would like to know how to
create
a variable col_index_num which will look up the right column itself, eg
look for
the column heading which contains the word "list" & return its
col_index_num.
Thanks for your help.





Bob Phillips

vlookup with variable col_index_num
 
=VLOOKUP(lookup_value,table_array,MATCH("list",OFF SET(table_array,0,0,1,),0)
,TRUE)

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"0-0 Wai Wai ^-^" wrote in message
...

VLOOKUP(lookup_value,table_array,col_index_num,ran ge_lookup)

Since my table is subject to constant change, I would like to know how to

create
a variable col_index_num which will look up the right column itself, eg

look for
the column heading which contains the word "list" & return its

col_index_num.
Thanks for your help.






All times are GMT +1. The time now is 10:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com