How do I create a predictive balance formula?
I'm not sure if this is even valid/possible, but I'm trying to create an accounting schedule which foresees upcoming payments and reflects the balance after the transaction. This image is a practice sheet with fictional values. In theory, I'd want the formula in Balance to always take the previous balance and add it to the amount, but there doesn't seem to be a way to make a column formula out of this.
The most important part is this: I want to write the formula in such a way that I can **reorder any row** and the balance will still be calculated correctly. For example, I want these rows to appear in the order that they actually occur. For example, say I've predicted row 6 to occur 7/16, but it actually takes place on 7/12 - I want to move that row up between rows 4 and 5 so that it is sorted by date, and then I want the balance calculation to accurately reflect the change over time.
What would be the best way to achieve the desired output?
Should I create a separate sheet and do the balance addition on the separate sheet?
Best Answer
-
Paul Newcome ✭✭✭✭✭✭
If it is set as an auto-number column, it will populate as soon as the sheet is saved.
thinkspi.com
Answers
-
Paul Newcome ✭✭✭✭✭✭
So it looks like maybe you want a running total of the Amount column based on the Due Date?
=SUMIFS(Amount:Amount, [Due Date]:[Due Date], @cell <= [Due Date]@row)
thinkspi.com
-
That's an interesting idea, but I don't think it's quite what I'm going for. I don't necessarily need each cell to contain an amount for each due date, I want the balance after each transaction.
Think of a bank transaction history, where it shows the total of your transaction and then the remaining balance at the time of the transaction's completion.
-
Paul Newcome ✭✭✭✭✭✭
Right. The formula would go in the Balance column. It is based on the date because you said you wanted it to accommodate being sorted by date. Have you plugged it in to try it?
thinkspi.com
-
Here is the result of your formula in the balance column. I sorted the rows by due date, too. Notice line 4 that paying Github $4 on 7/11 results in me having $2000 more dollars than I did in the previous cell.
-
Paul Newcome ✭✭✭✭✭✭
That is because it is adding up by date. I didn't realize you would have multiple entries on a single date.
插入一个auto-number列在thi(称为“汽车”s example). Formatting doesn't matter.
从这里插入一个文本(称为“Ro /数字列w" in this example) and use this column formula:
=MATCH([email protected], Auto:Auto, 0)
Then you can adjust the SUMIFS to say:
=SUMIFS(Amount:Amount, Row:Row, @cell <=[email protected])
thinkspi.com
-
Hmm, I may be a little bit confused? Did I do this correctly?
Was something supposed to go into the Auto column as well?
-
Paul Newcome ✭✭✭✭✭✭
If it is set as an auto-number column, it will populate as soon as the sheet is saved.
thinkspi.com
-
Paul Newcome ✭✭✭✭✭✭
Help Article Resources
Categories
Check out theFormula Handbook template!