Forum Discussion
How do I add or sum until?
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.
- iwaddoJun 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
- iwaddoJun 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.