anonymouslurker
New Member
- Joined
- Apr 2, 2020
- Messages
- 9
- Office Version
- 365
- Platform
- Windows
Hi everyone! Right now I'm having troubles with how to repeat my macro for each cell in A. I have some offsets so it becomes very confusing.
Here is my code. I recorded the macro while ticking 'Use Relative References' on.
Hopefully someone can help me. Thank you very much in advance
Here is my code. I recorded the macro while ticking 'Use Relative References' on.
Hopefully someone can help me. Thank you very much in advance
VBA Code:
Sub MacroTest()
'
' MacroTest Macro
'
'
ActiveCell.Rows("1:1").EntireRow.Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
ActiveCell.Offset(1, 8).Range("A1:A83").Select
Selection.Copy
ActiveWindow.ScrollRow = 1
ActiveCell.Offset(-1, -2).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
ActiveCell.Offset(1, -6).Range("A1:F1").Select
Application.CutCopyMode = False
Selection.Copy
ActiveCell.Offset(-1, 0).Range("A1").Select
ActiveSheet.Paste
ActiveCell.Offset(1, 0).Range("A1:J83").Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlUp
End Sub