Lovelylou79
New Member
- Joined
- Sep 4, 2017
- Messages
- 37
Hello,
I need to paste my header row into every blank row on my sheet. The header is at Row 2. Each blank row is spaced 5 rows apart.
I've tried several variations of his code, to no success;
ActiveSheet.UsedRange.Select
Dim i As Long
With Application
.Calculation = xlCalculationManual
.ScreenUpdating = False
For i = Selection.Rows.Count To 1 Step -1
If WorksheetFunction.CountA(Selection.Rows(i)) = 0 Then
Rows("2").Copy
ActiveCell.PasteSpecial xlPasteAll
End If
Next i
.Calculation = xlCalculationAutomatic
.ScreenUpdating = True
End With
Where am I going wrong?
I need to paste my header row into every blank row on my sheet. The header is at Row 2. Each blank row is spaced 5 rows apart.
I've tried several variations of his code, to no success;
ActiveSheet.UsedRange.Select
Dim i As Long
With Application
.Calculation = xlCalculationManual
.ScreenUpdating = False
For i = Selection.Rows.Count To 1 Step -1
If WorksheetFunction.CountA(Selection.Rows(i)) = 0 Then
Rows("2").Copy
ActiveCell.PasteSpecial xlPasteAll
End If
Next i
.Calculation = xlCalculationAutomatic
.ScreenUpdating = True
End With
Where am I going wrong?