Hi, I see there's someone having a similar problem in the thread down below, but unfortunately it's not helping me figure out what's going on with my code. I'm trying to conditionally format cells based on input values. I keep getting an object code required error when I run the following code which I was able to find on the net. I have put the code in the specific sheet, not the module. Any help would be appreciated.
Thanks,
Garrett
Sub Change_color()
'Selecting Color based on Actual Values
Dim icolor As Integer
If Not Intersect(Target, Range("C4:C37")) Is Nothing Then
Select Case Target
Case 0.98 To 1
icolor = 32
Case 0.95 To 0.9799
icolor = 34
Case 0.93 To 0.9499
icolor = 10
Case 0.9 To 0.9299
icolor = 27
Case 0 To 0.8999
icolor = 3
End Select
Target.Interior.ColorIndex = icolor
End If
End Sub
Thanks,
Garrett
Sub Change_color()
'Selecting Color based on Actual Values
Dim icolor As Integer
If Not Intersect(Target, Range("C4:C37")) Is Nothing Then
Select Case Target
Case 0.98 To 1
icolor = 32
Case 0.95 To 0.9799
icolor = 34
Case 0.93 To 0.9499
icolor = 10
Case 0.9 To 0.9299
icolor = 27
Case 0 To 0.8999
icolor = 3
End Select
Target.Interior.ColorIndex = icolor
End If
End Sub