6

Given something like:

| $1.10 |   |
| $2.20 |   |
| $3.30 |   |
|       |   |

How do you add the amounts with $-sign? C-c + does not work for me.

4

Short answer: in the form that you want to do it, it isn't possible. Sigil (the dollar sign) is used in Org mode formulas for special purposes such as denoting a column or a name of a variable. However, you could use the same units, but expressed differently. For instance, you could use Calc to add currency units like this:

  1. C-x * c - opens calculator.
  2. 'usdRET - puts the word usd on stack.
  3. u c answer prompts - creates a new fundamental unit named usd.
  4. u p saves units for future use.
  5. '1.13 usdRET - puts 1.13 usd on stack.
  6. u c creates new units, when prompted for units name answer with eur.
  7. u p save units again.

Alternatively, you could locate the Calc settings file (by examining M-:calc-settings-file, which is typically ~/.emacs.d/calc.el) and add:

(setq math-additional-units '(
  (eur "1.13 * usd" "Euro")
  (usd nil "United States Dollar")))

to this file. (You will only need to do this once.)

Now, you can write something like this in your Org file:

| 1.10 usd | 6.886 usd |
| 2.20 eur |           |
| 3.30 usd |           |
#+tblfm: @1$2=usimplify(vsum(@1$1..@3$1))
| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.