emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Distinguish between blank and zero in org-mode spreadsheet
@ 2012-12-10 22:32 Bob Newell
  2012-12-10 22:57 ` Thorsten Jolitz
  0 siblings, 1 reply; 9+ messages in thread
From: Bob Newell @ 2012-12-10 22:32 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 942 bytes --]

Can't find out about this anywhere.  My apologies if I missed something
simple or something already posted.

I want a calculation to appear in column 9 if and only if column 2 is
non-blank. If there is an explicit 0 in column 2, I want the calculation to
appear in column 9. But if column 2 is blank, I also want column 9 to be
blank.

I made it work with the following elisp example:

$9 = '(if (eq $2 "") "" (* (string-to-number @2$8) (string-to-number $1)));S

But the question is, can it be made to work with a calc formula, which
would be possibly a little more straightforward? All of the other columns
have the same requirement, and some of the formulas are quite long, so
doing many, many string-to-number functions makes things very cluttered.

The problem obviously revolves around a blank cell being interpreted as
zero. That's all well and good, and quite correct, but makes distinguishing
blank and explicit zero more difficult.

[-- Attachment #2: Type: text/html, Size: 1105 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-12-29 13:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-10 22:32 Distinguish between blank and zero in org-mode spreadsheet Bob Newell
2012-12-10 22:57 ` Thorsten Jolitz
2012-12-11  4:50   ` Bob Newell
2012-12-11  6:10     ` Nick Dokos
2012-12-11 15:14       ` Michael Brand
2012-12-15  9:15         ` Michael Brand
2012-12-15  9:23           ` Bastien
2012-12-28 14:10             ` Michael Brand
2012-12-29 13:39               ` Bastien

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).