I have used the Macro Recorder to help copy/paste data from a group of cells to a new page. The group of cells are copied separately and increment all the way across the page. (The code will explain this easier).
Is there an easy way to implement a loop to repeat this same program going down the page? i.e. the next group of cells I would want to copy would be
C14:F19 , I14:L19, etc. all the way to the row starting with C356:F361
The code has been shortened to fit into the post, but should give the general idea.
[CODE]
Sub Sort()
'
' Sort Macro
' Macro recorded 11/9/2007 by BF
'
'
Range("C5:F10").Select
Selection.Copy
Sheets("Sheet1").Select
Range("B3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("On Time Orders and Del.").Select
Range("B5").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet1").Select
Range("A3:A8").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("On Time Orders and Del.").Select
Range("I5:L10").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet1").Select
Range("B9").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("On Time Orders and Del.").Select
Range("B5").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet1").Select
Range("A9:A14").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("On Time Orders and Del.").Select
ActiveWindow.SmallScroll ToRight:=7
Range("O5:R10").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet1").Select
Range("B15").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("On Time Orders and Del.").Select
Range("B5").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet1").Select
Range("A15:A20").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("On Time Orders and Del.").Select
ActiveWindow.SmallScroll ToRight:=13
Range("U5:X10").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet1").Select
Range("B21").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("On Time Orders and Del.").Select
Range("B5").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet1").Select
Range("A21:A26").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
I know it is crude...but I have developed a macro to just copy/paste the data. However the code is very long and I could use some help with a Loop. I created a new thread concerning this:http://www.excelforum.com/showthread.php?t=622259
Thanks for any help.
Bookmarks