Gruppe
Allgemein
Problem
Es sollen die Zeilen gezählt werden, die Werte enthalten und nicht ausgeblendet sind.
StandardModule: Modul1
Sub VisibleRowsCount()
Dim iRow As Integer, iRowL As Integer, iColL As Integer, iCounter As Integer
iColL = Cells(1, 256).End(xlToLeft).Column
iRowL = Cells(Rows.Count, 1).End(xlUp).Row
For iRow = 1 To iRowL
If Rows(iRow).Hidden = False Then
If WorksheetFunction.CountA(Rows(iRow)) > 0 Then
iCounter = iCounter + 1
End If
End If
Next iRow
MsgBox iCounter
End Sub