Sub RunMe() Dim lRow As Long lRow = Range("F1").End(xlDown).Row Range("A1:F1").Interior.ColorIndex = 5 For Each cell In Range("F2:F" & lRow) If cell.Value = cell.Offset(-1, 0).Value Then Range(Cells(cell.Row, "A"), Cells(cell.Row, "F")).Interior.ColorIndex = cell.Offset(-1, 0).Interior.ColorIndex Else If cell.Offset(-1, 0).Interior.ColorIndex = 5 Then Range(Cells(cell.Row, "A"), Cells(cell.Row, "F")).Interior.ColorIndex = 8 Else Range(Cells(cell.Row, "A"), Cells(cell.Row, "F")).Interior.ColorIndex = 5 End If End If Next cell End Sub
DON'T MISS
And I'm sorry about the image, my excel file is complicated and in my attempt to simplify and cut it for this image I accidentally change the values. With only a minor change the code you gave me worked fine.
Thank you again