I have this code to hide the empty rows in a specific range, and it works well, but it hides all the rows in all the sheets in the Excel file.
It needs to be modified to work on Sheet1 only.
![]()
Sub HIDDEN() Dim xRg As Range Application.ScreenUpdating = False For Each xRg In Range("C18:C53") If xRg.Value < 1 Then xRg.EntireRow.HIDDEN = True Else xRg.EntireRow.HIDDEN = False End If Next xRg Application.ScreenUpdating = True End Sub
Bookmarks