Gruppe
Allgemein
Problem
Gleiche Einträge - in sortierter Reihenfolge sollen farblich markiert werden.
StandardModule: Modul1
Sub Vergleich()
Dim iRow As Integer, iColor As Integer
iColor = 41
Cells(1, 1).Interior.ColorIndex = iColor
iRow = 2
Do Until IsEmpty(Cells(iRow, 1))
If Cells(iRow, 1).Value <> Cells(iRow - 1, 1).Value Then
If iColor = 41 Then iColor = 42 Else iColor = 41
End If
Cells(iRow, 1).Interior.ColorIndex = iColor
iRow = iRow + 1
Loop
End Sub