Running Average of last n row if sum is between a certain value

ttngu17

New Member
Joined
Jul 18, 2024
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi there,
I'm looking for a formula to show the running average when the sum of the last n rows "B" is between a certain value, for example 500 to 550

Running Average of Cost when the sum of previous # row in B is between 500 to 550.



ABCostRunning AvgRow included in running average
11002000
21002000
3751500
4751500
5501000
6501000
750100015501-7
8100100013502-8
9100100011503-9
10100100010714-10
11100200012006-11
12100200014008-12

Thank you very much in advance!
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
I don't understand your examples. Based on the rows you have listed in that last column and assuming the relevant rows are the ones listed in the first column, I have entered average formulas below and they do not give the results that you have shown. What am I missing?

BTW, I suggest that you investigate XL2BB for providing sample data & expected results to make it easier for helpers to understand just what you have & where it is and also what you want & where it is to be.
(If you have trouble with XL2BB, review the "XL2BB Icons greyed out" link in the 'Known XL2BB issues' section near the top of the XL2BB Instructions page linked above.)

24 10 16.xlsm
ABCDE
1ABCostRunning AvgRow included in running average
211002000
321002000
43751500
54751500
65501000
76501000
875010001428.5714291-7
9810010001285.7142862-8
10910010001142.8571433-9
111010010001071.4285714-10
121110020001166.6666676-11
1312100200014008-12
Running average
Cell Formulas
RangeFormula
D8:D11D8=AVERAGE(C2:C8)
D12D12=AVERAGE(C7:C12)
D13D13=AVERAGE(C9:C13)
 
Upvote 0

Forum statistics

Threads
1,223,880
Messages
6,175,154
Members
452,615
Latest member
bogeys2birdies

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