Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Greetings,
I have a variable called myFile$ in my VBA that contains a file name. I want to use it in the following VLookUp. ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-16],'[&myFile&]TOTAL'!R1C1:R548C11, 10, FALSE)" When I run my script the variable doesn't resolve to the actual contents of the variable. Instead I get a dialog box prompting me with "Update Values:" as the title. When I cancel the ActiveCell indeed confirms that the vlookup formula contains &myFile& as the second parameter. The reason I need this is because my range for param 2 to vlookup is in a different file everytime i run my macro. Can someone advise as to a better way to do this and/or point me to some documentation? Thank you very much! Jeff |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
set a variable based on a vlookup | Excel Discussion (Misc queries) | |||
Variable col_index_num in vlookup | Excel Discussion (Misc queries) | |||
using variable names in VLOOKUP | Excel Programming | |||
vlookup using a variable | Excel Programming | |||
variable vlookup | Excel Programming |