I need some help on my code. It gives me a case without select case error. Can anybody give me some hints on what is wrong?
i is an integer, r and w are doublesFor 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
Case Is < w * 0.85
Range("R" & i).Activate
With Selection.Interior
.ColorIndex = 4
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
Case Else
Range("R" & i).Activate
With Selection.Interior
.ColorIndex = 1
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End Select
Next i
Bookmarks