Roger,
I too am looking to do conditional formatting for 5 colors, or more. I saw
this which you posted. I have never done VBA.
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
If IsNumeric(Target) Then
Target.Interior.ColorIndex = Target.Value
End If
End Sub
I did find the following VBA but I made 2 substitutions: 1) an array instead
of a1:a10; 2) the numbers. PROBLEM: When I tested numbers, not all the
colors appears, no light green (#35). Second problem, when I opened the
file, I said enable macros which changed the colors but once inside the
sheet, changing the number in the array didn't change the colors.
I NEED ALL COLORS TO CHANGE AS A VALUE CHANGES IN THE TARGET CELL.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim icolor As Integer
If Not Intersect(Target, Range("T4:Z5")) Is Nothing Then
Select Case Target
Case Is <= 0.00000025
icolor = 4
Case 0.000001 To 0.0000002495
icolor = 35
Case 0.00001 To 0.0000995
icolor = 2
Case 0.0001 To 0.000995
icolor = 6
Case Is >= 0.0001
icolor = 3
Case Else
'Whatever
End Select
Target.Interior.ColorIndex = icolor
End If
End Sub
I'm on an important project!
THANK YOU,
Phyllis