I need help getting this code to work. I have 1 cell (s25) that I need the conditional formatting in the code to be applied to based on the number in the cell. For example if the number is 6,003 then the cell turns blue, if the number is 25,005 then the cell turns tan, etc...).
I am not receiving any error messages on the code but nothing is happening in the cell whenever a change is made? Could someone please help me?
Private Sub Worksheet_Change(ByVal Target As Range)
Dim icolor As Integer
If Not Intersect(Target, Range("S25")) Is Nothing Then
Select Case Target
Case 1 To 6000
icolor = 35
Case 6001 To 25000
icolor = 37
Case 25001 To 50000
icolor = 40
Case 50001 To 75000
icolor = 4
Case 75001 To 100000
icolor = 6
Case 100001 To 400000
icolor = 3
End Select
Target.Interior.ColorIndex = icolor
End If
End Sub
Bookmarks