Find LOW or HIGH from a live cell

MktVBA

New Member
Joined
Aug 12, 2011
Messages
13
In VBA, I have cell A1, that is a changing(live) number. In cell B1 I want to register the lowest number that appeared in cell A1, over a certain time, like last 10 minutes.
Any idea, what would be the best way to do this, in excel or VBA?

Best

Bern
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Hi,

I'm not sure if this will work or if it is a correct way of doing things, but it's an option you can try:

Code:
Sub Try()

Dim oStop As Long
Dim iStop As Date
    
For oStop = 1 To 6
    Range("B1") = 9.99999999999999E+307
    
    iStop = Now() + TimeValue("00:10:00")
    Do Until Now() >= iStop
    DoEvents
        If Range("A1") < Range("B1") Then
            Range("B1") = Range("A1")
        End If
    Loop
Next oStop

End Sub

This 'theoretically' will loop for an hour, registering the lowest number within the 10 minute period and re-setting every 10 minutes.
 
Upvote 0

Forum statistics

Threads
1,224,583
Messages
6,179,672
Members
452,937
Latest member
Bhg1984

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top