i would like the below work across sheets "Summary", "W1", "W2", "W3","W4","W5" but I am facing some issues, can you please help.
The code is to hide empty rows across the above sheets, to hide unused rows. The above ranges are identical across all of the above sheets. The button is to toggle hide/unhide rows.
Thank you!
link to my file: my workbook
Private Sub CommandButton1_Click()
If CommandButton1.Caption = "Less Rows" Then
CommandButton1.Caption = "More Rows"
Else
CommandButton1.Caption = "Less Rows"
End If
On Error Resume Next
With Range("a8:a91,a96:a121").SpecialCells(xlBlanks).EntireRow
.Hidden = Not .Hidden
End With
On Error GoTo 0
End Sub
xlBlankscheck the content of the cell which can be a formula (it's not blank). - M--