Open duquewu opened 3 years ago
Hmm this sounds like a nice addition.
I would like to add it, but probably will not be able to get to it for a little bit. I'm very open to pull requests though if someone wants to beat me to it!
This doesn't fully address the problem but for people who don't mind re-running the function if you add/remove/re-order rows, this works pretty nicely. Certainly sorted my needs so I figured I'd share ☺️
| # | Sandwich |
| --- | ------------- |
| 1 | Italian Combo |
| 2 | Reuben |
| 3 | B.L.T. |
<!-- TBLFM: @I$<..@>$<=(@-1+1) -->
Thanks @tgrosinger for a great plugin.
@kilmc's solution can further be refined to @+0
which sort of makes sense.
Here's an example of it running in a budget table.
| Name | Credit | Debit | Sum | Total |
| -------- | ------- | ------ | --------:| -------:|
| Income | 3628.47 | | 3628.47 | 3628.47 |
| AA | | 400 | -400.00 | 3228.47 |
| Costco | | 272.59 | -272.59 | 2955.88 |
| Amazon | | 35 | -35.00 | 2920.88 |
| Freedom | | 140 | -140.00 | 2780.88 |
| Upstart | | 532.75 | -532.75 | 2248.13 |
| B&H | | 30 | -30.00 | 2218.13 |
| Guitar | | 20 | -20.00 | 2198.13 |
| Discover | | 91 | -91.00 | 2107.13 |
| Venmo | | | 0.00 | 2107.13 |
| Paypal | | | 0.00 | 2107.13 |
| Sara | | 1000 | -1000.00 | 1107.13 |
| | | | 0.00 | 1107.13 |
<!-- TBLFM: $4=0::$5=0 -->
<!-- TBLFM: $4=($2 - $3);%.2f -->
<!-- TBLFM: @I$>..@>$>=sum(@I$4..@+0$4) -->
@index | $index
means number of currentrow | column
.