Hi
could someone show me how to edit this code to pick up the values based on rows and change the cell colors based on number ranges (i.e. yellow if number range is between 0-10, red if number is in range between 11-20.
thanks
Private Sub Worksheet_SelectionChange(ByVal Target As Range)Dim rnArea As RangeDim rnCell As RangeSet rnArea = Range("A9:AT147") For Each rnCell In rnArea With rnCell If Not IsError(.Value) Then Select Case .Value Case "Yes" .Interior.ColorIndex = 45 Case "No" .Interior.ColorIndex = 20 Case "Whatever" .Interior.ColorIndex = 35 Case "Maybe" .Interior.ColorIndex = 40 End Select End If End WithNextEnd Sub</pre>
could someone show me how to edit this code to pick up the values based on rows and change the cell colors based on number ranges (i.e. yellow if number range is between 0-10, red if number is in range between 11-20.
thanks
Private Sub Worksheet_SelectionChange(ByVal Target As Range)Dim rnArea As RangeDim rnCell As RangeSet rnArea = Range("A9:AT147") For Each rnCell In rnArea With rnCell If Not IsError(.Value) Then Select Case .Value Case "Yes" .Interior.ColorIndex = 45 Case "No" .Interior.ColorIndex = 20 Case "Whatever" .Interior.ColorIndex = 35 Case "Maybe" .Interior.ColorIndex = 40 End Select End If End WithNextEnd Sub</pre>