S
sebastico
I need to write a looping structure from the following code
Any help is really appreciated
Macro3 Macro
' Macro recorded 07/03/2007 by Sebastico
Rows("3:6").Select
Selection.Insert Shift:=xlDown
Range("A2").Select
Selection.Copy
Range("A3:A6").Select
ActiveSheet.Paste
Rows("8:11").Select
Application.CutCopyMode = False
Selection.Insert Shift:=xlDown
Range("A7").Select
Selection.Copy
Range("A8:A11").Select
ActiveSheet.Paste
Rows("13:16").Select
Application.CutCopyMode = False
Selection.Insert Shift:=xlDown
Range("A12").Select
Selection.Copy
Range("A13").Select
ActiveSheet.Paste
Range("A13:A16").Select
ActiveSheet.Paste
Rows("18:21").Select
Application.CutCopyMode = False
Selection.Insert Shift:=xlDown
Range("A17").Select
Selection.Copy
Range("A18").Select
ActiveSheet.Paste
Range("A18:A21").Select
ActiveSheet.Paste
Range("B2").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "1"
Range("C2").Select
ActiveCell.FormulaR1C1 = "aa"
Range("B3").Select
ActiveCell.FormulaR1C1 = "2"
Range("C3").Select
ActiveCell.FormulaR1C1 = "bb"
Range("B4").Select
ActiveCell.FormulaR1C1 = "3"
Range("C4").Select
ActiveCell.FormulaR1C1 = "cc"
Range("B5").Select
ActiveCell.FormulaR1C1 = "4"
Range("C5").Select
ActiveCell.FormulaR1C1 = "dd"
Range("B6").Select
ActiveCell.FormulaR1C1 = "5"
Range("C6").Select
ActiveCell.FormulaR1C1 = "ee"
Range("B2:C6").Select
Selection.Copy
Range("B7:C21").Select
ActiveSheet.Paste
Any help is really appreciated
Macro3 Macro
' Macro recorded 07/03/2007 by Sebastico
Rows("3:6").Select
Selection.Insert Shift:=xlDown
Range("A2").Select
Selection.Copy
Range("A3:A6").Select
ActiveSheet.Paste
Rows("8:11").Select
Application.CutCopyMode = False
Selection.Insert Shift:=xlDown
Range("A7").Select
Selection.Copy
Range("A8:A11").Select
ActiveSheet.Paste
Rows("13:16").Select
Application.CutCopyMode = False
Selection.Insert Shift:=xlDown
Range("A12").Select
Selection.Copy
Range("A13").Select
ActiveSheet.Paste
Range("A13:A16").Select
ActiveSheet.Paste
Rows("18:21").Select
Application.CutCopyMode = False
Selection.Insert Shift:=xlDown
Range("A17").Select
Selection.Copy
Range("A18").Select
ActiveSheet.Paste
Range("A18:A21").Select
ActiveSheet.Paste
Range("B2").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "1"
Range("C2").Select
ActiveCell.FormulaR1C1 = "aa"
Range("B3").Select
ActiveCell.FormulaR1C1 = "2"
Range("C3").Select
ActiveCell.FormulaR1C1 = "bb"
Range("B4").Select
ActiveCell.FormulaR1C1 = "3"
Range("C4").Select
ActiveCell.FormulaR1C1 = "cc"
Range("B5").Select
ActiveCell.FormulaR1C1 = "4"
Range("C5").Select
ActiveCell.FormulaR1C1 = "dd"
Range("B6").Select
ActiveCell.FormulaR1C1 = "5"
Range("C6").Select
ActiveCell.FormulaR1C1 = "ee"
Range("B2:C6").Select
Selection.Copy
Range("B7:C21").Select
ActiveSheet.Paste