Sub DefineStyle() i = 2 Do Until Cells(i, 5).Value = "" If Cells(i, 5).Value > 39 Then Cells(i, 7).Value = "pink" ElseIf Cells(i, 5).Value > 36 Then Cells(i, 7).Value = "red" ElseIf Cells(i, 5).Value > 33 Then Cells(i, 7).Value = "yellow" ElseIf Cells(i, 5).Value > 30 Then Cells(i, 7).Value = "green" ElseIf Cells(i, 5).Value > 27 Then Cells(i, 7).Value = "aqua" Else Cells(i, 7).Value = "blue" End If i = i + 1 Loop End Sub