I have two named rows with information in between that I would like to toggle between hidden and unhidden. I don't want to use Data Grouping because the information in between the named rows is moved around frequently.
The upper row YEAR2019 and YEAR2020 are to remain visible at all times.
I'm currently trying this but receive errors and can't seem to get it to work -
Sub HideRowsYEAR2020()
Range(.Cells(.Range("YEAR2019").Row + 1), _
.Cells(.Range("YEAR2020").Row - 1)).Select
If Selection.EntireRow.Hidden Then
Selection.EntireRow.Hidden = False
Else
Selection.EntireRow.Hidden = True
End If
End Sub