From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Parker, Matthew" Subject: Using numbers w/ commas in spreadsheets? Date: Wed, 27 Aug 2008 00:18:14 -0400 Message-ID: <9E067A1AECCB154485D4CF7E4BEF4D8E097A1E3B@post07.corp.seic.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0595511804==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KYCUC-0002EA-9a for emacs-orgmode@gnu.org; Wed, 27 Aug 2008 00:18:24 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KYCUA-0002CV-CT for emacs-orgmode@gnu.org; Wed, 27 Aug 2008 00:18:23 -0400 Received: from [199.232.76.173] (port=51571 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KYCUA-0002CO-8g for emacs-orgmode@gnu.org; Wed, 27 Aug 2008 00:18:22 -0400 Received: from exprod5og106.obsmtp.com ([64.18.0.182]:52473) by monty-python.gnu.org with smtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KYCU9-0001Wq-LQ for emacs-orgmode@gnu.org; Wed, 27 Aug 2008 00:18:22 -0400 Content-class: urn:content-classes:message List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org This is a multi-part message in MIME format. --===============0595511804== Content-class: urn:content-classes:message Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C907FB.ECFB86F2" This is a multi-part message in MIME format. ------_=_NextPart_001_01C907FB.ECFB86F2 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Is it possible to work w/ numbers w/ commas in 'spreadsheets'? =20 when trying to add 3,000 to 4,000 below... =3D$1+$2 ... yields 7 =20 and this works but is long winded: @2$3=3D'(+ (string-to-number (replace-regexp-in-string "," "" $1)) (string-to-number (replace-regexp-in-string "," "" $2)) ) =20 I reviewed the chapter on tables... am I missing something simple? =20 Thanks =20 | 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=3D'(+ (string-to-number (replace-regexp-in-string "," "" $1)) (string-to-number (replace-regexp-in-string "," "" $2)) )::@3$3=3D$1+$2 =20 =20 ------_=_NextPart_001_01C907FB.ECFB86F2 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

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

 

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

  =3D$1+$2

... yields 7

 

and this works but is long = winded:

  @2$3=3D'(+ (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           &nbs= p;       |

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

| 3000    | 4000    | 7000           &nb= sp;      |

| 3,000   | 4,000   | 7            =          |

| 3,000   | 4,000   | 7000           &nb= sp;      |

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

| 3\,000  | 4\,000  | #ERROR           &= nbsp;    |

| '3,000' | '4,000' | #ERROR           &= nbsp;    |

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

 

 

------_=_NextPart_001_01C907FB.ECFB86F2-- --===============0595511804== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============0595511804==--