• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to Sum a column only up to certain limit

Badgerjace

New Member
Hi. Newbie here looking to separate layers of values from a toal to then apply a factor to them later. I'm struggling to get the values for my second column to stop at the necessary value. Hope my example will better explain it!

For example: 100 is the total value, I want to break it into values of 4 in each row so:
4
4
4
4
So on for 25 total rows. Then in the column next to it I only want it to do that until I get a Sum of another value. For example 13.
Example:
4. 4
4. 4
4. 4
4. 1
4. 0
4. 0

And on until the first column sums up to 100.

Can I do this with a formula?

Thank you so much for the help.
 
Badgerjace
cell B2 4
cell B3 100
cell C3 13
cell B5 =IF(SUM($B$2,B$4:B4)<B$3,$B$2,B$3-SUM(B$4:B4))
and copy down and right as needed
Please, next time attach an Excel-file.
 
Back
Top