Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Reference workbook name to cell reference
Hi,
I have this line of code in workbook "Team 3.xls": Sheets("Output").Copy After:=Workbooks("11_07 Summary Team 3.xls").Sheets(1) Rather than manually replacing the name of the workbook each month (eg to 12_07 Summary Team 3.xls etc), is it possible to reference the workbook name ("11_07 Summary Team 3.xls") to a cell reference, say Sheets("Data").Range("J11") which resides in Team 3.xls. Any assistance appreciated. Cheers Bob |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Reference workbook name to cell reference
The parameter in the workbook function is a string a any string referrence
can be used. I would add an intermediate variable to make it easier to understand the code bookname = Sheets("Data").Range("J11") Sheets("Output").Copy After:=Workbooks(bookname).Sheets(1) "Bob Maloney" wrote: Hi, I have this line of code in workbook "Team 3.xls": Sheets("Output").Copy After:=Workbooks("11_07 Summary Team 3.xls").Sheets(1) Rather than manually replacing the name of the workbook each month (eg to 12_07 Summary Team 3.xls etc), is it possible to reference the workbook name ("11_07 Summary Team 3.xls") to a cell reference, say Sheets("Data").Range("J11") which resides in Team 3.xls. Any assistance appreciated. Cheers Bob |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Reference workbook name to cell reference
Many thanks, Joel.
Cheers Bob "Joel" wrote in message ... The parameter in the workbook function is a string a any string referrence can be used. I would add an intermediate variable to make it easier to understand the code bookname = Sheets("Data").Range("J11") Sheets("Output").Copy After:=Workbooks(bookname).Sheets(1) "Bob Maloney" wrote: Hi, I have this line of code in workbook "Team 3.xls": Sheets("Output").Copy After:=Workbooks("11_07 Summary Team 3.xls").Sheets(1) Rather than manually replacing the name of the workbook each month (eg to 12_07 Summary Team 3.xls etc), is it possible to reference the workbook name ("11_07 Summary Team 3.xls") to a cell reference, say Sheets("Data").Range("J11") which resides in Team 3.xls. Any assistance appreciated. Cheers Bob |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Providing a reference to another cell in a different workbook | Excel Worksheet Functions | |||
workbook/cell reference w/ formula | Excel Worksheet Functions | |||
Use the value of a cell within a reference to another workbook? | Excel Worksheet Functions | |||
cell reference in another workbook | Excel Discussion (Misc queries) | |||
cell reference in another workbook | Excel Programming |