Counting how many times a cell changes per minute

Bravo1

New Member
Joined
May 26, 2010
Messages
3
Hello
I have a number of different cell ranges in a worksheet that are each being continuously updated via a DDE link.
I need to know separately how many times each cell (or range of cells) has changed over the past minute, on a continuous basis (rather than step-wise from one minute to the next).
Can someone please suggest some code to do this?
Thanks in advance.
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
something similar to this but modified how you please (bigger range and counting integer somewhere on the sheet), this goes under sheet1 in vba editor not module.


Private Sub Worksheet_Change(ByVal Target As Range)
Dim KeyCells As Range

' The variable KeyCells contains the cells that will
' cause an alert when they are changed.
Set KeyCells = Range("A1")

If Not Application.Intersect(KeyCells, Range(Target.Address)) _
Is Nothing Then
' Display a message when one of the designated cells has been
' changed.
' Place your code here.


End If
 
Upvote 0
Thanks very much for the starter Benson.
I sure the worksheet_change event procedure will work - I'm still trying to play around with this at the moment.
The main problem I'm having though is coming up with a counting technique that will work to capture the number of changes for the past minute only. Any suggestions?
 
Upvote 0
if its ONLY for a specified time maybe try using something like

Code:
dim asd as variant
dim dsa as variant
 
dsa = now()
asd = now()
 
do until asd = dsa + TimeValue("00:01:00")
 
'all code here
 
asd = now()
loop

this will need tweaking but should work fine
 
Upvote 0

Forum statistics

Threads
1,224,607
Messages
6,179,871
Members
452,948
Latest member
UsmanAli786

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