Option Explicit Sub Colore() Dim Nriga As Long Dim IColore As Long Dim primo As Variant Dim secondo As Variant Application.ScreenUpdating = False Nriga = 6 IColore = 19 Range(Cells(Nriga, 1), Cells(Nriga, 6)).Interior.ColorIndex = IColore Do While Cells(Nriga, 1) <> "" primo = Cells(Nriga, 1).Value secondo = Cells(Nriga, 1).Offset(1, 0).Value If secondo = primo Then Range(Cells(Nriga, 1), Cells(Nriga, 6)).Interior.ColorIndex = IColore Else Range(Cells(Nriga, 1), Cells(Nriga, 6)).Interior.ColorIndex = IColore If IColore = 20 Then IColore = 19 Else IColore = 20 End If Nriga = Nriga + 1 Loop Application.ScreenUpdating = True End Sub