View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Bill Renaud Bill Renaud is offline
external usenet poster
 
Posts: 417
Default Worksheet_Calculate with no effect

Also, look carefully at your list of If statements. You have a second If
statement right after the first one, which ignores all of the previous
logic. For example:

If rang = -1 And rang < -0.6 Then
rang.Font.ColorIndex = 2
ElseIf rang = -0.6 And rang < 0.6 Then
rang.Font.ColorIndex = 1
ElseIf rang = 0.6 And rang < 1 Then
rang.Font.ColorIndex = 2
End If

....resets the ColorIndex to 2 if the cell has a value between 0.6 and 1,
even though it was set to 46 or 53 in the long If statement above.

--
Regards,
Bill Renaud