ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Variable table array name in VLOOKUP (https://www.excelbanter.com/excel-programming/342559-variable-table-array-name-vlookup.html)

DoctorG

Variable table array name in VLOOKUP
 
I need to retrieve values from an external spreadsheet table, but this table
is variable (one of many). Can anyone help with specifying a variable table
array name??

Example :

field1 = 1
dbname = vlookup(field1;internal_table;fieldindex) --result = "DataArea2"
(or DataArea3 etc)

I need to access DataArea2 (or DataArea3 etc) in C:\WORK\external.xls, which
is an external spreadsheet...

field2 = "something"
my_problem=vlookup(field2;'C:\WORK\external.xls'!& dbname;otherfieldindex)

How can I stuff the contents of variable dbname in the VLOOKUP syntax??

DoctorG

Variable table array name in VLOOKUP
 
HELLO!!! Anyone???

Please advise - if this is impossible I should change the logic of my
spreadsheet. ANY answer will be deeply appreciated


Rbp9ad[_2_]

Variable table array name in VLOOKUP
 
I very new to programming so I might not now exactly what you are asking but
I had a similar problem. Dave Peterson wrote some code for me that works for
what I needed. The strings where you can find this have the subject line
"VLookup in Multiple Arrays" and "Trouble wth Looping".
"DoctorG" wrote in message
...
HELLO!!! Anyone???

Please advise - if this is impossible I should change the logic of my
spreadsheet. ANY answer will be deeply appreciated





All times are GMT +1. The time now is 01:24 PM.

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