Loop for the Recorded Macro [Closed]

Report
Posts
7
Registration date
Wednesday November 8, 2017
Status
Member
Last seen
December 13, 2017
-
Hello,

I have recorded the below Macro. All i want is to Loop till the end.

Sub MainTranspose()
'
' MainTranspose Macro
'
' Keyboard Shortcut: Ctrl+t
'
Sheets("Raw").Select
Selection.End(xlUp).Select
Selection.End(xlToLeft).Select
Selection.End(xlToLeft).Select
ActiveCell.Offset(1, 0).Range("Table_owssvr3[#Headers,[Name]:[Form Name]]"). _
Select
Selection.Copy
Sheets("Macro").Select
ActiveSheet.Paste
Sheets("Raw").Select
ActiveCell.Offset(0, 5).Range("Table_owssvr3[#Headers,[Name]:[CC 1]]").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Macro").Select
ActiveCell.Offset(0, 5).Range("A1").Select
ActiveSheet.Paste
ActiveSheet.Previous.Select
ActiveCell.Offset(0, 8).Range("Table_owssvr3[#Headers,[Name]:[CC 1]]").Select
Application.CutCopyMode = False
Selection.Copy
ActiveSheet.Next.Select
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveSheet.Paste
ActiveSheet.Previous.Select
ActiveCell.Offset(0, 8).Range("Table_owssvr3[#Headers,[Name]:[CC 1]]").Select
Application.CutCopyMode = False
Selection.Copy
ActiveSheet.Next.Select
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveSheet.Paste
ActiveSheet.Previous.Select
ActiveCell.Offset(0, 8).Range("Table_owssvr3[#Headers,[Name]:[CC 1]]").Select
Application.CutCopyMode = False
Selection.Copy
ActiveSheet.Next.Select
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveSheet.Paste
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveSheet.Previous.Select
ActiveCell.Offset(0, 8).Range("Table_owssvr3[#Headers,[Name]:[CC 1]]").Select
Application.CutCopyMode = False
Selection.Copy
ActiveSheet.Next.Select
ActiveCell.Select
ActiveSheet.Paste
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveSheet.Previous.Select
ActiveCell.Offset(0, 8).Range("Table_owssvr3[#Headers,[Name]:[CC 1]]").Select
Application.CutCopyMode = False
Selection.Copy
ActiveSheet.Next.Select
ActiveCell.Select
ActiveSheet.Paste
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveSheet.Previous.Select
ActiveCell.Offset(0, 8).Range("Table_owssvr3[#Headers,[Name]:[CC 1]]").Select
Application.CutCopyMode = False
Selection.Copy
ActiveSheet.Next.Select
ActiveSheet.Paste
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveSheet.Previous.Select
ActiveCell.Offset(0, 8).Range("Table_owssvr3[#Headers,[Name]:[CC 1]]").Select
Application.CutCopyMode = False
Selection.Copy
ActiveSheet.Next.Select
ActiveSheet.Paste
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveSheet.Previous.Select
ActiveCell.Offset(0, 8).Range("Table_owssvr3[#Headers,[Name]:[CC 1]]").Select
Application.CutCopyMode = False
Selection.Copy
ActiveSheet.Next.Select
ActiveCell.Select
ActiveSheet.Paste
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveSheet.Previous.Select
ActiveCell.Offset(0, 8).Range("Table_owssvr3[#Headers,[Name]:[CC 1]]").Select
Application.CutCopyMode = False
Selection.Copy
ActiveSheet.Next.Select
ActiveSheet.Paste
ActiveCell.Offset(0, 8).Range("A1").Select
Selection.End(xlUp).Select
ActiveSheet.Previous.Select
ActiveCell.Offset(0, 8).Range("Table_owssvr3[#Headers,[Name]]").Select
Application.CutCopyMode = False
Selection.Copy
ActiveSheet.Next.Select
ActiveSheet.Paste
ActiveCell.Range("A1:A10").Select
Application.CutCopyMode = False
Selection.FillDown
ActiveCell.Offset(0, -1).Range("A1").Select
Selection.End(xlToLeft).Select
ActiveCell.Range("A1:E10").Select
Selection.FillDown
End Sub


Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!