Forum Discussion
iwaddo
Jun 24, 2024Copper Contributor
How do I add or sum until?
If my input is 20, I want to add back up a column sequential until I've reached >=20 Examples, if the column is - 5, 10, & 12, I need 100% of the 5, 100% of the 10 & only 41.66% of the 12 - 1...
HansVogelaar
Jun 24, 2024MVP
With data in A2 and down, and the target amount in D2, enter the following formula in B2:
=IF(A2="", "", MIN($D$2-SUM(A$1:A1), A2)/A2)
Format as a percentage, then fill down as far as you want.
iwaddo
Jun 24, 2024Copper Contributor
Thank you, I can see how that works. My example was over simplified so I will now try and build your answer into my spreadsheet, I may have further questions but you've given me a great place to start.
Thank you for your help.