jammer6_9
06-02-2010, 07:26 AM
Below code gives exactly what I wanted but it takes time to initiate? Is there any way to make it faster?
Sub HideEmptyRows()
LastRow = ActiveSheet.UsedRange.Row - 1 + _
ActiveSheet.UsedRange.Rows.Count
Application.ScreenUpdating = False
For r = LastRow To 1 Step -1
If Application.CountA(Rows(r)) = 0 Then Rows(r).EntireRow.Hidden = True
Next r
End Sub
Sub HideEmptyRows()
LastRow = ActiveSheet.UsedRange.Row - 1 + _
ActiveSheet.UsedRange.Rows.Count
Application.ScreenUpdating = False
For r = LastRow To 1 Step -1
If Application.CountA(Rows(r)) = 0 Then Rows(r).EntireRow.Hidden = True
Next r
End Sub