Sub test()
Dim lesRows As Range, lescolumns As Range, nbcol&, nbrow&, col, lig&
'on dimensionne la plage à observer de A1 à la dernière cells du usedrange
With ActiveSheet.UsedRange
Set plage = Range(.Parent.Cells(1), .Cells(.Cells.Count))
End With
lig = plage.SpecialCells(xlCellTypeVisible).Cells(1).Row
col = plage.SpecialCells(xlCellTypeVisible).Cells(1).Column
Set lescolumns = plage.Rows(lig).SpecialCells(xlCellTypeVisible)
nbcol = plage.Columns.Count - lescolumns.Cells.Count
Set lesRows = plage.Columns(col).SpecialCells(xlCellTypeVisible)
nbrow = plage.Rows.Count - lesRows.Cells.Count
MsgBox nbrow & " lignes masquées sur " & plage.Rows.Count & vbCrLf & _
nbcol & " colonnes masquées sur " & plage.Columns.Count
End Sub