Calculating average rate of change in real time

Geoff Halsall

New Member
Joined
May 21, 2014
Messages
31
I have a real time numerical value in cell A1.
5 seconds later this value updates into cell A2,
then in another 5 seconds it updates into cell A3.
This continues in this way up to say cell 200

How can I calculate the average rate of change
with respect to all the numerical values in column A
at any given time

Would really appreciate any help

Thanks
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
My next question is this

How would you calculate the average rate of change taking account of say only the last 10 cell values in the column

Example

Cells 1 to 10, then 2 to 11, then 3 to 13, then 4 to 14........and so on


Thanks for your help
 
Upvote 0
A bit more involved, but I believe this will work for you:

=IF(COUNT(A:A) > 10,SUM(INDIRECT("A"&ROW(INDEX(A:A,COUNT(A:A)-9,1))):INDIRECT("A"&ROW(INDEX(A:A,COUNT(A:A),1))))/10,SUM(A:A)/COUNT(A:A))
 
Upvote 0
Maybe ????......


Drag B10 formula down as required.

Excel 2007
AB
110
28
36
416
517
618
719
820
921
102215.7
1115.716.27
121717.17
131818.37
141918.67
152018.97
162119.27
172219.57
Sheet11
Cell Formulas
RangeFormula
B10=IF(A1="","",SUM(A1:A10)/COUNTA(A1:A10))
B11=IF(A2="","",SUM(A2:A11)/COUNTA(A2:A11))
 
Upvote 0
WOW bbott. That is a mouthful

I will give it a go and see what happens, then let you know

Thanks for your time and knowledge in helping me sort my problem.

Your a good guy friend
 
Upvote 0
Edit: Oops, plenty of replies since I refreshed the page.

Hi Geoff,

I wouldn't call that a rate of change; it's just a running average. Assuming your data starts in column A, put this formula in say, cell B1, then copy down.

=AVERAGE($A$1:A1)

Note the mixed static and relative references.

Rukt
 
Upvote 0
I wouldn't call that a rate of change; it's just a running average.

You're correct, Rukt.

Geoff, if you just want to see the % change between the current value and previous value in column A, try:

=(INDIRECT("A"&COUNT(A:A))-OFFSET(INDIRECT("A"&COUNT(A:A)),-1,0))/OFFSET(INDIRECT("A"&COUNT(A:A)),-1,0)
 
Upvote 0
bbott, for percentage change, why not the simpler =(A2-A1)/A1, which is equivalent to =(A2/A1)-1. Or if you're concerned about cells moving around, =(A2/OFFSET(A2,-1,0))-1

Geoff, if you're still interested in finding the average of the last 10 cells (or last X cells), the below is an option. A1 and $A$1 are first cell in your range (start with the first one and copy down; note the dynamic and static references); and X is the number of rows you want to take the average across.

=AVERAGE(OFFSET(A1,1-MIN( X ,ROW()-ROW($A$1)+1),0,MIN(X,ROW()-ROW($A$1)+1),1))

Cheers,
Rukt
 
Upvote 0

Forum statistics

Threads
1,215,807
Messages
6,127,002
Members
449,351
Latest member
Sylvine

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