Tested in Excel 2016 (16.0.9330.2073) 64-bit
You can check with something like this:
- Public Function CheckIfAnyHiddenColOrRow(SheetToCheck As String, Optional RowOrCol = "Row") As Boolean
- Dim test As Boolean
- Dim i
- test = False
- If LCase(RowOrCol) = "row" Then
- For i = 1 To Rows.Count
- If Rows(i).Hidden Then
- test = True
- Exit For
- End If
- Next i
- Else
- For i = 1 To Columns.Count
- If Columns(i).Hidden Then
- test = True
- Exit For
- End If
- Next i
- End If
- CheckIfAnyHiddenCol = test
- End Function
Or just unhide all:
- Sub UnhideAllColsAndRows()
- Cells.Select
- Selection.EntireColumn.Hidden = False
- Selection.EntireRow.Hidden = False
- End Sub