i currently have a spreadsheet which is streaming numerical data.
i would like to monitor the highest and lowest values relating to a specific cell.
i found this post helpful using UDF's however it only alows for one cell to be monitored not multiple individual cells. i think its because it always reverts to the same stored min and stored max of the oithers
the code is below. if anyone can help it would be most appreciated.
thanking you in advance
Function runningMax(inVal As Double) As Double
Static storedMax As Double
If inVal = 0 Then
storedMax = 0
Else
storedMax = Application.Max(inVal, storedMax)
End If
runningMax = storedMax
End Function
Function runningMin(inVal As Double) As Double
Static storedMin As Double
If inVal = 0 Then
storedMin = 9.9e+99
Else
storedMin = Application.Min(inVal, storedMin)
End If
runningMin = storedMin
End Function
Bookmarks