That worked, thanks Bernie. Also, how would I get the font to change to white
for the Blue Cells? Is there any way to make the code work only for certain
cells, or is this a worksheet-wide application only?
Thanks once more, Brian
"Bernie Deitrick" wrote:
Brian,
Move this line:
Select Case Application.Round(cRange.Value, 2)
in place of this line:
Select Case cRange.Value
You should only have one Select Case line in your procedure.
HTH,
Bernie
MS Excel MVP
"Brian in FT W." wrote in message
...
thanks for the response...
This is the code that I inserted, upon my second attempt:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim cRange As Range
Select Case Application.Round(cRange.Value, 2)
Set cRange = Intersect(Range("A1:M99"), Target(1))
If cRange Is Nothing Then Exit Sub
With cRange.Interior
.ColorIndex = xlNone
Select Case cRange.Value
Case Is < 0
.ColorIndex = xlNone
Case Is < 1.1
.ColorIndex = 3
Case Is < 2.5
.ColorIndex = 6
Case Is < 3.5
.ColorIndex = 4
Case Is <= 4#
.ColorIndex = 5
End Select
End With
End Sub
The code did not work. I got an error that said: Statements and labels
invalid between the select case and first case. The cRange = was
highlighted.
|