cells from another workbook

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
Back
Top