Thread: Easy one...
View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
EricG EricG is offline
external usenet poster
 
Posts: 220
Default Easy one...


Something like this:

Private Sub CommandButton1_Click()
ActiveSheet.Cells(5, 10).Value = ""
ActiveSheet.Cells(5, 10).Formula =
"=IF(J5=""STOP"",""STOP"",IF(V5<I5,""STOP"","""")) "
End Sub


"EricG" wrote:

...although I think I just created somewhat of a circular reference. The
only way to reset that cell's (J5) value after "STOP" is triggered is to
either modify the formula or to have a "Reset" button that resets the value
to blank.

"EricG" wrote:

Maybe a modified formula, again with conditional formatting:

=IF(J5="STOP","STOP",IF(V5<I5,"STOP",""))

This way, if J5 is already "STOP", it will stay that way. If it starts out
as blank, then it will only go to "STOP" when V5 becomes less than I5.

HTH,

Eric

"John" wrote:

I don't want the cell to change back if the value goes back above the set
value in I5... I want it to trigger and stay "STOP" so I don't want to use a
formula

"Patrick Molloy" wrote:

J5: =IF(V5<I5,"STOP","")

and set conditional formatting when J5 value ="STOP"

"John" wrote in message
...
I have a sheet that updates from an external feed...

I want to change cell J5 to "STOP" and format it RED if cell V5 is below
the
value found in I5

is there an 'on calculate' command?