Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hello is it possible to create a variable for a file name:
for example x.xls where x=cell A1 I am trying to create a vlook up formula that can access differnt xls files =vlookup([x.xls]!,A2:A4,2) something like that I can't get x to be a variable equal to whatever is in cell A1 this one is a toughy.... |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
x = cells(1, 1).Value
Workbooks(x).Activate Or x = Range("A1").Value Workbooks(x).Activate In either of those two syntax you would need to be in the active worksheet, otherwise you would have to specify the worksheet like: x = Worksheets(2).Cells(1, 1).Value Workbooks(x).Activate Your active workbook would have to be in the same directory as the workbook you call from Range("A1"), if you do not have the entire path in that cell. "BEAST" wrote: hello is it possible to create a variable for a file name: for example x.xls where x=cell A1 I am trying to create a vlook up formula that can access differnt xls files =vlookup([x.xls]!,A2:A4,2) something like that I can't get x to be a variable equal to whatever is in cell A1 this one is a toughy.... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Creating a help file | Excel Programming | |||
Creating cub file using VBA | Excel Programming | |||
Creating a new excel file from an existing file using macro | Excel Programming | |||
Creating a help file | Excel Programming | |||
creating an exe file with visual basic (installation file for Macros and Userforms) | Excel Programming |