Finding next subtotal row, insert average for cells

johnsvikings

New Member
Joined
Dec 3, 2018
Messages
8
Hello,

I have a very long spreadsheet that has already has its subtotals for a varying number of rows between the previous subtotaled row and the row it is on as shown below

Column X - Days Outstanding

Rows 2 - 12 column X has data in them
row 13 = subtotaled row with a blank subtotal - nothing in cell X13
Rows 14 - 30 column X has data in them
Row 31 = subtotaled row with a blank subtotal - nothing in cell X31
Row 32-100 = column X has data in them
Row 101 = subtotaled row with a blank subtotal - nothing in cell X101

My question is how can I insert an Average into cell X13 that calculates based on the cell value in column X for rows 2 - 12, then again insert an Average into cell X31 that calculates based on the cell value in column X for rows 14 - 30, insert an Average into cell X101 that calculates based on the cell value in column X for rows 32 - 100, and so on.

There are over 5,000 subtotaled rows in this spreadsheet so it is important that it locates the next subtotaled row.
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Forum statistics

Threads
1,215,457
Messages
6,124,941
Members
449,198
Latest member
MhammadishaqKhan

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