Předpoklad, že sloupec A je seřazen.Sub ObarviRadek()
Dim barva As Long, barva1 As Long, barva2 As Long, i As Long
Dim hodnota As String
barva1 = vbYellow
barva2 = vbGreen
hodnota = Cells(1, 1)
barva = barva1
For i = 1 To Cells(Rows.Count, 1).End(xlUp).Row
If Cells(i, 1) <> hodnota Then
If barva = barva1 Then
barva = barva2
Else
barva = barva1
End If
End If
Rows(i).Interior.Color = barva
hodnota = Cells(i, 1)
Next i
End Sub
citovat