emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Using numbers w/ commas in spreadsheets?


From: Parker, Matthew
Subject: [Orgmode] Using numbers w/ commas in spreadsheets?
Date: Wed, 27 Aug 2008 00:18:14 -0400

Is it possible to work w/ numbers w/ commas in 'spreadsheets'?

 

when trying to add 3,000 to 4,000 below...

  =$1+$2

... yields 7

 

and this works but is long winded:

  @2$3='(+ (string-to-number (replace-regexp-in-string "," "" $1)) (string-to-number (replace-regexp-in-string "," "" $2)) )

 

I reviewed the chapter on tables... am I missing something simple?

 

Thanks

 

| one     | two     | sum                   |

|---------+---------+-----------------------|

| 3000    | 4000    | 7000                  |

| 3,000   | 4,000   | 7                     |

| 3,000   | 4,000   | 7000                  |

| "3,000" | "4,000" | [103, 88, 96, 96, 96] |

| 3\,000  | 4\,000  | #ERROR                |

| '3,000' | '4,000' | #ERROR                |

#+TBLFM: @2$3='(+ (string-to-number (replace-regexp-in-string "," "" $1)) (string-to-number (replace-regexp-in-string "," "" $2)) )::@3$3=$1+$2

 

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]