VBA COUNT PER MIN. is it possible

graemeal

Active Member
Joined
May 17, 2007
Messages
316
Platform
  1. Windows
I have live numbers coming into a spreadsheet in increments of 1.
roughly 2000 live cells (all differant figures). B2:B2000 Is is possible to count the number of transaction coming into those cells per minute, or per 30 seconds and have it displayed in the C column. C2:C2000

So if say there are 10 transactions per minute coming into B2 can it be displayed live (as in constantly changing as the transaction change) as 10 in C2
This was a suggestion but an error is displayed. Compile error
Syntax error

I assume you have to grab a snapshot of the figure in say C2, record it somewhere. then take another one 1 min later and compare the both ???. VERY NEW AT THIS!!!!

Sub CntPerMin()
* Dim WB As Workbook, SH As Worksheet
* Set WB = Workbooks("book2")
* Set SH = WB.Sheets("sheet1")
* SH.Range("C1").Value = SH.Cells(Rows.Count, 1).End(xlUp).Row - startt
* Application.OnTime Now() + TimeValue("00:01:00"), "CntPerMin"
* startt = SH.Cells(Rows.Count, 1).End(xlUp).Row
End Sub

Thanks
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
You appear to be calling your routine (CntPerMin) from within itself (in the OnTime) line. I don't know for certain, but I'm guessing that's not a good plan.

Can you put a counter in your main routine, and then use OnTime to call a routine that pastes the counter value in column C?
 
Upvote 0

Forum statistics

Threads
1,215,011
Messages
6,122,680
Members
449,091
Latest member
peppernaut

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