Re: Macro to insert a blank row after every 2201 cells below
This assumes that your data starts in A1. Try with a backup
Sub This()
Dim a, b()
Dim i As Long, x As Integer, y As Long, z As Integer
With Sheets(1).Range("A1:A" & Cells(Rows.Count, "A").End(xlUp).Row)
a = .Value
End With
x = Sheets(1).Cells(Rows.Count, "A").End(xlUp).Row / 2200
If x > 1 Then
ReDim b(1 To UBound(a, 1) + x, 1 To 1)
For i = 1 To (UBound(a, 1))
If z = 2201 Then
b(y, 1) = Empty
b(y + 1, 1) = a(i, 1)
y = y + 1
z = 1
Else
y = y + 1
b(y, 1) = a(i, 1)
End If
z = z + 1
Next
End If
With Sheets(1).Cells(1, 1).Resize(UBound(b, 1))
.ClearContents
.Value = b
End With
End Sub
Display More