I am trying to keep track of the lowest value ever seen by a particular cell. For instance. If cell "a1" is a calculated value that is dependent upon other cells, I would like to update a different cell "b1" with any value lower than the lowest low of cell "a1". I seem to be running in circles because I can't seem to store the current value of cell "a1" and then update it if the value changes to a lower number.
Here's what I have so far and it doesn't work.
Private Sub Worksheet_Change(ByVal a1 As Range)
Dim NewVal As Double
Static CurrVal
a1.Value = CurrVal
If CurrVal < CurrVal Then
CurrVal = Worksheets("sheet1").Cells("b1")
End If
End Sub
Thanks,
Will
Here's what I have so far and it doesn't work.
Private Sub Worksheet_Change(ByVal a1 As Range)
Dim NewVal As Double
Static CurrVal
a1.Value = CurrVal
If CurrVal < CurrVal Then
CurrVal = Worksheets("sheet1").Cells("b1")
End If
End Sub
Thanks,
Will