Hi all,
I know that the Multi Row Forumla tool will (probably) solve my problem but I don't know how to get there.
I have a list of stocks where some securities will have multiple line items and some might just have 1. There are many fields that differentiate them beyond a Shares column but I narrowed it down for simplicity. I have a column that has the number of shares I need to sell that's constant based off the Security name and I need to continuously subtract from the 2nd column. So for GOOGL, I want to sell a total of 85 shares, so I want to sell all 40 from the first entry, all 30 from the second entry, 15 from the third entry, and none from the last two.
It's a bit confusing so I'm happy to give further clarification if needed. Thank you greatly for any help in figuring this out!
| Security | Shares | Shares to Sell | Remaining Shares to Sell | Shares Remaining |
| AAPL | 500 | 300 | 0 | 200 |
| GOOGL | 40 | 85 | 45 | 0 |
| GOOGL | 30 | 85 | 15 | 0 |
| GOOGL | 100 | 85 | 0 | 85 |
| GOOGL | 10 | 85 | 0 | 10 |
| GOOGL | 5 | 85 | 0 | 5 |
| AMZN | 50 | 55 | 5 | 0 |
| AMZN | 10 | 55 | 0 | 5 |