This is in response to the original question, it is a simple modification of Vincent's response:
If it is a named range (using the UI: Insert, Name, Define):
Dim c As Range For Each c In Range("ColRange").Cells If c.Value >= 0 And c.Value <= 500 Then c.Interior.Color = RGB(255, 0, 0) ElseIf c.Value >= -5 Then c.Interior.Color = RGB(255, 255, 200) Else c.Interior.Color = RGB(0, 255, 0) End If Next c
If it is a range object, defined in the code:
Dim c as Range For Each c In colRange.Cells If c.Value >= 0 And c.Value <= 500 Then c.Interior.Color = RGB(255, 0, 0) ElseIf c.Value >= -5 Then c.Interior.Color = RGB(255, 255, 200) Else c.Interior.Color = RGB(0, 255, 0) End If Next c
I think Vincent's response won't quite work because, it attempts to operate on the entire ColRange range, inside the If Then, rather than operating on each cell one at a time. (For this reason, you may also want to wrap it with Application.ScreenUpdating = False