Thread: Macro Question
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Adam Adam is offline
external usenet poster
 
Posts: 287
Default Macro Question

I need some help with a macro i want to run. It involves cutting a block of
data from a workbook, and pasting transposed into another workbook. So
basically i want to be able to run this macro that will copy the block of
data from data workbook, switch workbooks, paste transposed onto the new
workbook, move down for rows (the original data only has 4 columns), switch
back to the original work book, and then move to the next sheet. And then
repeat over and over and over again. etc. I need it to move down 4 rows so
its ready for the next sheet of data, so i can "stack" the data on top of
each other. Heres the code that i have when i recorded the macro

Range("E15:H24").Select
Selection.Copy
Windows("Data Sheet-2-20-08.xls").Activate
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=True
ActiveCell.Offset(0, 1).Select
Windows("Advocate.xls").Activate
ActiveSheet.Next.Select

The issue im having is that i need to remove the "Selection" line of code.
Each time i run the macro its going to always copy and paste to that cell.
What i need it to do is move down 4 rows each time, so i can "stack" the data
on top of each other.

Let me know if this makes sense, and if you can help me with this.

-Adam