VBA for-schleife: Leere Zeilen überspringen?

1 Antwort

Leere Zellen kannst du mit

IsEmpty(Cells(IntZeile, 33)) 

identifizieren.

Sub PreisBerechnung()
    Dim IntZeile As Integer

    For IntZeile = 4 To 199
        If Not IsEmpty(Cells(IntZeile, 33))) Then
            Cells(IntZeile, 33).GoalSeek Goal:=2.5, ChangingCell:=Cells(IntZeile, 26)
        End If    
    Next
End Sub

Das sollte dein Problem lösen