# Need help with simple excel macro to take sums and averages

1. ## Need help with simple excel macro to take sums and averages

Hey,

I am new to excel and need help creating a macro to do a simple task.

First, I would like excel to take the sum of the cells in B2:B1441 and place that sum in cell J2
I would like it to then take the sum of the cells in B1442:B2881 and place that sum in cell J3
And continue this trend up until we take the sum of B420542:B421981 and place that in cell J294

Following that, I would like to do the same thing for column C
For example, take the sum of the cells in C2:C1441 and place that sum in cell K2
Up until the point where the sum of cells C420542:C421981 and place that in cell K294

I would like to repeat that for columns up until column G
Where for example the sum of the cells G2:G1441 would be placed in Cell O2
Up until the point where the sum of cells G420542:G421981 and place that in cell O294

After that, I would like to do the same function, but taking the averages of the columns instead of the sums.

For example, I would take the average of cells B2:B1441 and place that in cell R2
And continue this trend up until we take the average of B420542:B421981 and place that in cell R294

I would like to continue this trend for the same columns (B-G) placing them in the corresponding cells
For example, I would continue until we take the average of G2:G1441 would be placed in Cell W2
Up until we take the average of cells G420542:G421981 and place that in cell W294

Thank you so much. Help is very much appreciated

2. ## Re: Need help with simple excel macro to take sums and averages

Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

Remember to desensitize the data.

Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

There are currently 1 users browsing this thread. (0 members and 1 guests)