Dear all,
Need you help with correcting / simplifying macro to hide blank rows.
PFA for the sheet. Row 18 is not being hidden.
Sub Hide_UnusedRows()
'Hide Unused Rows
Application.ScreenUpdating = False
Sheets("Sheet1").Select
Range("A1").Select
Dim LastRow As Long
LastRow = ActiveSheet.UsedRange.Rows.Count
For i = 4 To LastRow
If ActiveSheet.Range("B" & i) = "" Then
ActiveSheet.Rows(i).Hidden = True
End If
Next
Application.ScreenUpdating = True
Range("A1").Select
ActiveWorkbook.Save
End Sub
Request your help in correcting the code.
Thanks,
Vinod Krishna
Bookmarks