SUM the Previous n Cell Values

Simonc64

Active Member
Joined
Feb 15, 2007
Messages
251
Office Version
  1. 365
Hi Guys

Been struggling with this on and off for a few days and finally given in! Seems so simple but cant get my head round the logic!

Column A contains numerical values (for examples sake lets say the column runs from A2:A36) A1 is a text heading

In Column B I need a formula that i can run thru cells B2:B36 that SUMS every 6th value (B1 is a text heading)

I have tried the OFFSET formula as follows =SUM(OFFSET(A7,(ROW()-8)*6,0,6,1)),"") which works fine for rows B2:B6, but of course when the formula reached B12 it falls over because the offset references are absolute and dont change.

Tearing my hair out so ANY help welcomed!

Thanks

Simon
 
D
E
F
G
H
I
J
K
L
M
Row5
Hrs per piece
1
.5
.8
.5
8
120
2
2.5
1
Row6
Total Hrs
2
1
1.6
1
16
240
4
5
2
Row7
Total Days
33
33
33
33
32
30
2
1
1

<tbody>
</tbody>
Total Pieces=2


Here’s what we’re looking at. We are going off of 8 hourworks days. Every time the sum is close to equaling 8 without going over in Row6 a day is added in Row 7 starting from the right. There are 30 days in cell J7because it will take 240 hours (30 days) to process two pieces. In summary I needto add a day to Row 7 for every ~8 hours that are summed up in Row 6.

Thank you.

 
Upvote 0

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
I am using Internet Explorer.
In that case you should have another option for posting a grid like you did. Follow the Look here link in my signature block below and then the Borders-Copy-Paste link.

In relation to you latest sample I'm afraid I still don't fully understand. Can you step though a few more examples, starting from the first cell (M7?)
Why is that cell 1 when the total so far in row 6 is only 2 - not "close to equalling 8"?
Then explain the calculation for L7 being 1, K7 being 2 and J7 being 30 (I thought J7 should be more than 30 going by your previous descriptions)
 
Upvote 0

Forum statistics

Threads
1,214,523
Messages
6,120,031
Members
448,940
Latest member
mdusw

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