DAX - ColorIndex based on value


Posted by Laura on July 22, 2001 11:08 AM

Still working with the message box can i have the color
of my calculation change color between red and blue
If < "Red"
Else
If > "Blue"
Thanks Laura

Posted by Dax on July 22, 2001 11:51 AM

Laura,
I take it you want the cell colour of S17 to change? This slight change will do that and you can adjust it to suit your needs if it's not what you want.

Dax.

Private Sub Worksheet_Change(ByVal Target As Range)
If ([S17] < [S11]) And Not IsEmpty([S17]) And Not IsEmpty([S11]) Then
[S17].Font.Color = vbRed
MsgBox "S17 is lower than S11. Please change cell M11", vbExclamation + vbOKOnly, "Error!"
Else
[S17].Font.Color = vbBlue
End If
End Sub



Posted by Laura on July 22, 2001 2:57 PM

Thanks again Dax