I would like a macro that, each time it is called, cuts the subsequent row (beginning at row 2) and inserts it into row 1.
So far I have:
I would like the counter to be reset the first time it encounters a blank row. So, if zCount =6 and row 6 is blank, I would like the zCount to be set to 1 again.
Can someone help with this?
So far I have:
Code:
Public zCount As Integer
Sub insertRow()
zCount = zCount + 1
Rows(zCount).Select
Selection.Cut
Rows("1:1").Select
ActiveSheet.Paste
End Sub
I would like the counter to be reset the first time it encounters a blank row. So, if zCount =6 and row 6 is blank, I would like the zCount to be set to 1 again.
Can someone help with this?