vba code almost working, just needs one edit to look at one column to left of where it looks

need a code script modified.

you will see in the attached that the formula is summing the wrong columns. it is supposed to look for when the array crosses 215,000 of the sum of the preceding columns, then take the sum of all of the next columns . for some reason it starts an n+1, n+2 instead of summing n,n+1,n+2...i.e. it skips the cell immediately following the cell where threshold was crossed.
RunningSumTestingQ29115305-SUMMING-.xlsm
finnstoneAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

byundtMechanical EngineerCommented:
I don't believe the code needs to be modified. As written, it allows you to specify whether to include the pivot cell or not.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
byundtMechanical EngineerCommented:
Look at formula for cell G34 in the attached workbook.
=RunningSum(H34:CA34,12,12,215000,2)            'Sums K34:N34
=RunningSum(H34:CA34,12,12,215000,1)                 'Sums J34:N34

Open in new window

The only difference between these two formulas is value of last parameter.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.