Wie lassen sich zwei IF-Abfragen in einer
For-Schlaufe kombinieren.
Ich wäre froh für einen Hinweis
Besten Dank im Voraus
Private Sub Worksheet_Calculate()
Dim iRow As Variant, iRowL As Variant
iRowL = Cells(Rows.Count, 6).End(xlUp).Row
For iRow = 1 To iRowL
If Cells(iRow, 15) > Cells(iRow, 16) Then
Cells(iRow, 16) = Cells(iRow, 15)
Cells(iRow, 17).Value = Now
End If
Next iRow
End Sub
Zweite If-Abfrage
iRowL = Cells(Rows.Count, 6).End(xlUp).Row
For iRow = 1 To iRowL
If Cells(iRow, 19) > Cells(iRow, 18) Then
Cells(iRow, 18) = Cells(iRow, 19)
Cells(iRow, 20).Value = Now
End If
Next iRow