sivakumar rathinam
New Member
sir, suppose I have 10 rows , but I have data in only first five row how hide the remaining five rows automatically anyone reply
Private Sub Worksheet_Activate()
Dim c As Range
For Each c In Range("A2:A1000")
If c.Value = "" Then
c.EntireRow.Hidden = True
Else
c.EntireRow.Hidden = False
End If
Next c
End Sub
for unhide the Hidden Rows use the below code
Sub UnhideRows()
Dim c As Range
For Each c In Range("A2:A1000")
c.EntireRow.Hidden = False
Next c
End Sub