leave one blank row between data in *visible* rows
GettingThere wrote:
Hello Ken,
Your comment:
"... then the only way that you could end up with the processed blocks being
separated by more than one blank row is when whole blocks of data have been
hidden..."
...was right on. I hadn't looked at the problem that way, but as soon as I
read that, I realized that all I really needed to do was make sure that I hid
the blank row that followed each block of hidden data. This what I ended up
doing:
Public Sub HideAllButOneTake2()
'work backwards
Dim I As Long
For I = 299 To 2 Step -1
If Cells(I, 1).EntireRow.Hidden = True Then
Cells(I + 1, 1).EntireRow.Hidden = True
End If
Next I
End Sub
Thanks for your help - I appreciate it!
Hi,
That's a neat solution.
Thanks for the feedback, it's nice knowing I was of some assistance.
Ken Johnson
|