Is there a way to modify this code so that it only hides/unhide rows from a specific range such as Row 21:89?
Sub HideLLRows() 'This sub un/hides blank rows in EIRP LL
Application.ScreenUpdating = False
Dim i As Long
Dim EIRPLL As Worksheet
Dim NewState As VbTriState
Dim dat As Variant
Dim rws As Range
Dim LastRow As Long
Set EIRPLL = Sheets("EIRP LL")
With EIRPLL.UsedRange
LastRow = .Rows.Count - .Row + 1 ' in case used range doesn't start at row 1
dat = .Columns(2).Resize(LastRow, 1)
End With
NewState = vbUseDefault
With EIRPLL
For i = 6 To LastRow
If dat(i, 1) = "" Then
If NewState = vbUseDefault Then
NewState = Not .Rows(i).Hidden
End If
If rws Is Nothing Then
Set rws = Cells(i, 1)
Else
Set rws = Union(rws, Cells(i, 1))
End If
End If
Next
End With
rws.EntireRow.Hidden = NewState
Application.ScreenUpdating = True
End Sub