leave one blank row between data in *visible* rows
Thanks for the reply Ken.
Unfortunately, it doesn't work because there could be many hidden rows
between each blank.
Perhaps I need some sort of loop? Like If IsEmpty(c) then while c.offset
(i,0) ....
I'll keep trying.
Happy New Year!
"Ken Johnson" wrote:
Hi,
Try this out on a copy of your data.
It seems to work.
Sub leaveOneBlankRow()
Dim c As Range
For Each c In Range("a1:a300")
If Not IsEmpty(c) And c.EntireRow.Hidden = True Then
c.Offset(1, 0).EntireRow.Hidden = True
End If
Next c
End Sub
Ken Johnson
|