Re: Worksheet_Calculate with no effect

Tech-Archive recommends: Fix windows errors by optimizing your registry



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



.


Quantcast