Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Vlookup with an InputBox
Hi,
Is it possible with VBA to enter the Table_Array of a Vlookup with an Inputbox? My problem is that the vlookup that I run needs a table_Array that could resides in several directories. -- Regards, Jeff |
#2
|
|||
|
|||
Maybe...
But then you'd have to rely on the typing of the user. Maybe you could use application.getopenfilename to retrieve the filename, then open that workbook, then use application.inputbox to get the range out of that workbook. Another option if the address/worksheet names/workbook names/folder names don't change. Make a list with all the options, put it into a combobox. Let the user select from that list. Jeff wrote: Hi, Is it possible with VBA to enter the Table_Array of a Vlookup with an Inputbox? My problem is that the vlookup that I run needs a table_Array that could resides in several directories. -- Regards, Jeff -- Dave Peterson |
#3
|
|||
|
|||
Hi Dave,
I need the application application.inputbox to get the file since the range will not change and will be set. -- Regards, Jeff "Dave Peterson" wrote: Maybe... But then you'd have to rely on the typing of the user. Maybe you could use application.getopenfilename to retrieve the filename, then open that workbook, then use application.inputbox to get the range out of that workbook. Another option if the address/worksheet names/workbook names/folder names don't change. Make a list with all the options, put it into a combobox. Let the user select from that list. Jeff wrote: Hi, Is it possible with VBA to enter the Table_Array of a Vlookup with an Inputbox? My problem is that the vlookup that I run needs a table_Array that could resides in several directories. -- Regards, Jeff -- Dave Peterson |
#4
|
|||
|
|||
What are you trying to retrieve from the user?
If it's the file name, I'd use application.getopenfilename. If it's a range from an already open workbook, then application.inputbox makes sense. But since that range doesn't change, it sure sounds like you just want to get the filename that containst that range. Jeff wrote: Hi Dave, I need the application application.inputbox to get the file since the range will not change and will be set. -- Regards, Jeff "Dave Peterson" wrote: Maybe... But then you'd have to rely on the typing of the user. Maybe you could use application.getopenfilename to retrieve the filename, then open that workbook, then use application.inputbox to get the range out of that workbook. Another option if the address/worksheet names/workbook names/folder names don't change. Make a list with all the options, put it into a combobox. Let the user select from that list. Jeff wrote: Hi, Is it possible with VBA to enter the Table_Array of a Vlookup with an Inputbox? My problem is that the vlookup that I run needs a table_Array that could resides in several directories. -- Regards, Jeff -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using single cell reference as table array argument in Vlookup | Excel Worksheet Functions | |||
VLOOKUP Limitations | Excel Worksheet Functions | |||
Have Vlookup return a Value of 0 instead of #N/A | Excel Worksheet Functions | |||
vlookup data hidden within worksheet | Excel Worksheet Functions | |||
Vlookup info being used without vlookup table attached? | Excel Worksheet Functions |