Hi Tano,
You missed out three "End With" statements.
Your code should read as follows:
Sub test()
For i = 11 To 51
r = Range("R" & i).Value
w = Range("M" & i).Value
Select Case r
Case Is > w * 1.15
Range("R" & i).Activate
With Selection.Interior
.ColorIndex = 3
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
Case Is < w * 0.85
Range("R" & i).Activate
With Selection.Interior
.ColorIndex = 4
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
Case Else
Range("R" & i).Activate
With Selection.Interior
.ColorIndex = 1
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
End Select
Next i
End Sub
Hope this helps
Seamus
Bookmarks