Averaging every 24th row, and posting the result to an adjacent column

TommyC

New Member
Joined
Apr 10, 2013
Messages
8
I have a long list of hourly values in Column C and am interested in generating averages of blocks of 24 consecutive cells. I have searched via Google and found a couple formulas that don't quite work. I also tried to search Mr. Excel and got no hits on this task.

The pattern I'd like is to average, say, C31:C54 and place the result in Cell D54.
Then average C55:C78 and place the result in Cell D78, and so forth.

The examples I've seen placed all the averages in consecutive rows within an adjacent column, but I think I'd like to have them spread out in association with the 24-row blocks they represent. I hope that makes sense.

Any help is appreciated.
 
Sorry. Post #19 should have read:

The correct formula that achieved my desired result when applied to Cell D54 is this one:

=IF(MOD(ROW(),24)=6,AVERAGE(INDIRECT("C"&ROW()-23&":C"&ROW())),"")

The only remaining mystery is this:
When I copied the formula all the way down Column D, it erased all the horizontal lines, as well as the vertical lines bordering Column E. :mad:

I checked the sheet and believe the "fill" in the cell I started with was "no color". I'll try again.
 
Upvote 0

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Forum statistics

Threads
1,214,946
Messages
6,122,401
Members
449,081
Latest member
JAMES KECULAH

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