emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric S Fraga <e.fraga@ucl.ac.uk>
To: Nick Dokos <ndokos@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Formatting a calculated cell entry as currency
Date: Fri, 7 Jun 2013 20:00:49 +0100	[thread overview]
Message-ID: <87vc5pagpq.fsf@ucl.ac.uk> (raw)
In-Reply-To: <87fvwunc7a.fsf@pierrot.dokosmarshall.org> (Nick Dokos's message of "Thu, 6 Jun 2013 17:47:37 -0400")

Nick Dokos <ndokos@gmail.com> writes:

> david@adboyd.com (J. David Boyd) writes:
>
>> I've got a simple cell calculation, =@2 * 40
>>
>> If @2 contained 10, is there anyway to force this to show as $400.00?  I've
>> combed through the info file, and if it is there I'm blind.
>>
>
> This seems to work (apart from the alignment):
>
> | a | b      |
> |---+--------|
> | 1 | $8.25  |
> | 2 | $16.50 |
> | 3 | $24.75 |
> #+TBLFM: $2 = 8.25*$1;$%.2f

For David's benefit, if alignment matters, you could use something like
";$%6.2f" for the formatting specification (with 6 changed to something
that is appropriate for the scale of values you expect and whether you
like a space after the $).

-- 
: Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D
: in Emacs 24.3.50.1 and Org release_8.0.3-193-g334581

      reply	other threads:[~2013-06-07 19:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-06 21:20 Formatting a calculated cell entry as currency J. David Boyd
2013-06-06 21:47 ` Nick Dokos
2013-06-07 19:00   ` Eric S Fraga [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vc5pagpq.fsf@ucl.ac.uk \
    --to=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    --cc=ndokos@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).