Public Sub DeleteHiddenRows()
Dim rngVisible As Range
Dim rngAll As Range
On Error Resume Next ' In case there are no hidden/ visible rows
Application.ScreenUpdating = False
Set rngVisible = Range("A:A").SpecialCells(xlCellTypeVisible)
Set rngAll = Range("A:A")
With rngAll
.EntireRow.Hidden = False ' Unhide all rows
rngVisible.EntireRow.Hidden = True ' Hide rows originally visible
.SpecialCells(xlCellTypeVisible).EntireRow.Delete ' Delete 'flipped' rows
.EntireRow.Hidden = False ' Unhide all rows
End With
Application.ScreenUpdating = True
On Error GoTo 0
End Sub