
VBA: Excel workbook to workbook transfer
I am trying to a messy report that I run at work into a beautiful and
useful Excel Spreadsheet. It is run on a Unix system, so when I transfer
it to a PC and pull it up in Excel there is a pattern but this pattern is
useful in Excel.
I am new to programing in VB or VBA and that's why I am having a hard to
time getting this to work. This is all the program/macro consists of:
Windows("giver.xls").Activate
Range("D2").Select
Selection.Copy
Windows("receiver.xls").Activate
Range("A2").Select
ActiveSheet.Paste
This little segment is going to need to repeat itself more time than I
care to write it and probable more that VBA can handle, so I want to make
it into a loop. I have that already set up and it works fine. This is
the problem: How do I get VBA to recogniz a variable instead of "D2" or
"A2". The letters (D,A) can stay, but the numbers need to change.
Any help would be greatly appreciated.
Thank you,