Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following code that works in a loop
Cells(j, 2) = Sheets("Sheet1").Cells(j, 5) What I am struggling to do is get this to work when "Sheet1" is in another workbook (that will be open). Is there code that would read something like: Cells(j, 2) = Workbooks("Base Data.xls").Sheets("Sheet1").Cells(j, 5) Thanks in advance |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The code you wrote should work assuming the file Base Data.xls is open and
there is a sheet named Sheet1 in that workbook. Mike "fullers" wrote: I have the following code that works in a loop Cells(j, 2) = Sheets("Sheet1").Cells(j, 5) What I am struggling to do is get this to work when "Sheet1" is in another workbook (that will be open). Is there code that would read something like: Cells(j, 2) = Workbooks("Base Data.xls").Sheets("Sheet1").Cells(j, 5) Thanks in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy cells based on conditions in one workbook to another workbook | Excel Discussion (Misc queries) | |||
Copy cells based on conditions in one workbook to another workbook | Excel Worksheet Functions | |||
workbook linking cells not working within a workbook | Excel Discussion (Misc queries) | |||
referencing workbook from cells in another workbook | Excel Programming | |||
Copy a range of cells in an unopened workbook and paste it to the current workbook | Excel Programming |