* Formatting a calculated cell entry as currency
@ 2013-06-06 21:20 J. David Boyd
2013-06-06 21:47 ` Nick Dokos
0 siblings, 1 reply; 3+ messages in thread
From: J. David Boyd @ 2013-06-06 21:20 UTC (permalink / raw)
To: emacs-orgmode
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.
Dave
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Formatting a calculated cell entry as currency
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
0 siblings, 1 reply; 3+ messages in thread
From: Nick Dokos @ 2013-06-06 21:47 UTC (permalink / raw)
To: emacs-orgmode
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):
--8<---------------cut here---------------start------------->8---
| a | b |
|---+--------|
| 1 | $8.25 |
| 2 | $16.50 |
| 3 | $24.75 |
#+TBLFM: $2 = 8.25*$1;$%.2f
--8<---------------cut here---------------end--------------->8---
--
Nick
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Formatting a calculated cell entry as currency
2013-06-06 21:47 ` Nick Dokos
@ 2013-06-07 19:00 ` Eric S Fraga
0 siblings, 0 replies; 3+ messages in thread
From: Eric S Fraga @ 2013-06-07 19:00 UTC (permalink / raw)
To: Nick Dokos; +Cc: emacs-orgmode
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-06-07 19:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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).