I have a range "Sample_Range" which is basically A5:Y209. The sheet has some code to hide rows where there is no value in row A. This works fine.
I would like to figure out what code is needed to unhide the first row after the last entry in row A and only one row. The result would be all the visible rows after running the code above plus a new blank row (at least where A is blank. Is this possible?
Thanks,
Guy
Code:
Sub HideRows()
On Error GoTo ProcError
Application.ScreenUpdating = False
Range("Hide_Row_Counter").Value = "Completed"
Dim i As Long
For i = 5 To Range("A5:A209").Count
If Len(Cells(i, 2)) = 0 Then
Rows(i).Hidden = True
End If
Next
Application.ScreenUpdating = True
Range("Hide_Row_Counter").Value = "Completed"
ProcError:
End Sub
I would like to figure out what code is needed to unhide the first row after the last entry in row A and only one row. The result would be all the visible rows after running the code above plus a new blank row (at least where A is blank. Is this possible?
Thanks,
Guy
Last edited: