Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
forextrader
 
Posts: n/a
Default Average dynamic data cells over a one hour period?

How do I sample numbers data from a dynamic cell in Excel each minute and
show an average of this accumulated data for a one hours time, with the
running average result showing in another cell(updating every minute)?
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Average dynamic data cells over a one hour period?

Here is one way

Option Explicit

Dim nStart As Date
Dim nTime As Date

Sub StartCounter()
nStart = Now
nTime = Now + TimeSerial(0, 1, 0)
Application.OnTime nTime, "RunCounter"
End Sub

Sub RunCounter()
Static RunningTotal

RunningTotal = RunningTotal + Range("H1").Value
Range("H2").Value = "Running: " & RunningTotal
If Now nStart + TimeSerial(0, 3, 0) Then
nTime = Now + TimeSerial(0, 1, 0)
Application.OnTime nTime, "RunCounter"
Else
Application.OnTime nTime, "RunCounter", , False
End If
End Sub

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"forextrader" wrote in message
...
How do I sample numbers data from a dynamic cell in Excel each minute and
show an average of this accumulated data for a one hours time, with the
running average result showing in another cell(updating every minute)?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help PLEASE! Not sure what answer is: Match? Index? Other? baz Excel Worksheet Functions 7 September 3rd 05 03:47 PM
Label an average line in a dynamic chart John Cordes Charts and Charting in Excel 3 June 17th 05 09:42 AM
How can I make the graph omit blank cells in the data set? easy Charts and Charting in Excel 3 March 17th 05 02:48 PM
Pulling data from 1 sheet to another Dave1155 Excel Worksheet Functions 1 January 12th 05 05:55 PM
Convert data type of cells to Text,Number,Date and Time Kevin Excel Worksheet Functions 1 December 31st 04 12:57 PM


All times are GMT +1. The time now is 12:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"