Sub test() For i = 2 To Cells(Rows.Count, 1).End(xlUp).Row If CDbl(Cells(i + 1, 3)) > CDbl(Cells(i, 3)) Then lngStrich = Cells(i, 2).Row Range(Cells(lngStrich, 1), Cells(lngStrich, 8)).Select With Selection.Borders(xlEdgeBottom) .LineStyle = xlDash .Weight = xlThin End With End If Next i End Sub
Sub test() For i = 2 To Cells(Rows.Count, 1).End(xlUp).Row If Format(Cells(i + 1, 3).Value, "hh:mm") > Format(Cells(i, 3).Value, "hh:mm") Then lngStrich = Cells(i, 2).Row Range(Cells(lngStrich, 1), Cells(lngStrich, 8)).Select With Selection.Borders(xlEdgeBottom) .LineStyle = xlDash .Weight = xlThin End With End If Next i End Sub
58.4k Fragen
249k Antworten
7k Nutzer