Reduction of Massive Dataset

jkharmer

Board Regular
Joined
Jul 7, 2008
Messages
77
Hi there,

I have an excel document which has rows and rows of data, however, I want to average the data every 12 rows (the data is taken every 5 seconds and I want to convert it to 60 second averages). Is there any way to write a macro to generate a new column by averaging the 12 data points and then putting it into one uninterrupted column?

Thanks very much, James
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Hi James

You don't need a macro. A Pivot Table will do it automatically, just group the time by minute.

So:

- create a PT. Use your data as source
- right-click on the time, Group->Minutes
- on the data, choose Average
 
Upvote 0
Thanks for trying to help, but I do not understand these pivot tables! I have selected the times and data, but it average all of the data - how do I tell it to just average 12 cells, then another 12, then another 12 etc?
 
Upvote 0
You will have to ensure that your data column containing the time is formatted as Time.

Then in your Pivot Table > right click anywhere in the Time column > Select Group and Show Detail > Select Group > Select Minutes as your Grouping.

That should do it.
 
Upvote 0

Forum statistics

Threads
1,213,492
Messages
6,113,967
Members
448,537
Latest member
Et_Cetera

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