Let's say, I have a following table:

| NAME    | VALUE |   
| DAVID   |  3.83 |   
| JULIA   |  0.89 |   
| ALICE   |  0.59 |   
| SUM     |  5.31 | 

With the following formula:

#+TBLFM: @>$2=vsum(@2$2..@-1$2)

When I want to calculate the contents of the column 2, I just call org-ctrl-c-star with my keybinding, and the sum gets recalculated. Works like charm.

Sometimes I'm adding names or deleting names, or change the score of the names.

Then I would like to sort the column 2 based on the value. I quickly sort by using C-c ^ (sometimes do the ^ again) with the point inside the table. You’ll be prompted for a sorting type, where you can choose e.g. a for alphabetic or n for numeric. I usually choose capital letter (N) of these options to reverse the sort (as in from highest to lowest).

I would like to include this in the same formula, when I'm recalculating the total sum of the scores. Since I know Org-mode offers this functionality to reverse sort the column, how could I capture the functionality inside the formula?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.