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
This example better explains what I am trying to do. Probably in a table.
Thank you for your help.
- HansVogelaarJun 24, 2024MVP
You've lost me completely. Why does a formula suddenly appear in row 6 for the first time? Why not in row 3, or in row 8?
- iwaddoJun 24, 2024Copper Contributor
Sorry, my example is not clear. I do want a formula in every row as I add a new row. I just did the bottom few to try and highlight what I was trying to do.
In simple terms I want to calculate the cost of fuel just used.
Thank for trying to help