View Single Post
  #3   Report Post  
swatsp0p
 
Posts: n/a
Default


you can use VBA code pasted into the "sheet module" of the sheet -
right mouse click on the sheet tab and choose view / code. The VBA
project window opens, on the right you see some white space - copy &
paste the code in there.

Private Sub Worksheet_Change(ByVal Target As Range)

On Error GoTo ws_exit:
Application.EnableEvents = False
' adjust range below to meet your needs
If Not Intersect(Target, Me.Range("A1:H10")) Is Nothing Then
With Target
Select Case UCase(.Value)
'Case Is 2500: .Interior.ColorIndex = ? do you have
values 2500?
Case Is 1000: .Interior.ColorIndex = 3
Case Is 500: .Interior.ColorIndex = 13
Case Is 250: .Interior.ColorIndex = 46
Case Is 100: .Interior.ColorIndex = 6
Case Is 50: .Interior.ColorIndex = 10
Case Is 0: .Interior.ColorIndex = 5
'etc.
End Select

End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

Good Luck


--
swatsp0p


------------------------------------------------------------------------
swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
View this thread: http://www.excelforum.com/showthread...hreadid=472580