Thread: Looping Macro
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Looping Macro

Possibly

Sub Stitution()
For x = 23 To 73 Step 50
Range("S" & x & ":U" & x).Select
Application.CutCopyMode = False
Selection.Copy
Range("S" & x + 50).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Next
End Sub

Mike

"Jase" wrote:

I have recorded a macro that selects a certain range then pastes into a
certain range then scrolls down about 50 cells and does the same thing. Is
there a way to loop this instead of always selecting particular ranges?

example of macro....

Range("S23:U23").Select
Application.CutCopyMode = False
Selection.Copy
Range("S63").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("S73:U73").Select
Application.CutCopyMode = False
Selection.Copy
Range("S123").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False