Sum every 7 rows in another sheet and paste result

Yulyo

Board Regular
Joined
Jul 17, 2017
Messages
94
Hello all,

I have a very urgent situation, if you can help me:
- I need a vba to look in sheet4, make the sum between every 7 days (c2:c8), and copy the result in sheet1 H7, then go again to sheet4, make the sum between next 7 days (c9:c15) and copy the result in sheet1 h8, and so on for every 7 days...


Please download the test file:
https://drive.google.com/open?id=1rZhy9iSQfRQlk-mEf9j3kjcc3rvY9W_i

Thank you in advance!
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Why not simply use a formula in H7 and copy down?

Code:
=SUM(INDEX(Sheet4!$C:$C,ROWS($H$7:$H7)*7-5):INDEX(Sheet4!$C:$C,ROWS($H$7:$H7)*7+1))

WBD
 
Upvote 0
Thank you very much wideboydixon,
Everything it's working almost perfectly on the test file.
Tha only problem is that in my working file, KW7 starts on row 1876 on sheet4 and i can't get it to work...
 
Upvote 0
I think you just need to adjust the rows:

Code:
=SUM(INDEX(Sheet4!$C:$C,ROWS($H$7:$H7)*7+1869):INDEX(Sheet4!$C:$C,ROWS($H$7:$H7)*7+1875))

WBD
 
Upvote 0

Forum statistics

Threads
1,216,762
Messages
6,132,576
Members
449,737
Latest member
naes

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