emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Christian Moe <mail@christianmoe.com>
To: Uwe Brauer <oub@mat.ucm.es>
Cc: emacs-orgmode@gnu.org
Subject: Re: spreadsheet, generate a column beg end
Date: Tue, 25 Mar 2014 23:30:15 +0100	[thread overview]
Message-ID: <m2siq5vrm0.fsf@uio.no> (raw)
In-Reply-To: <87bnwuf65o.fsf@gilgamesch.quim.ucm.es>


Hi,

Here's one way to do it, applied to an example that takes less space:
With ten rows, say we want to count down from 365 to 358 in the middle
of the middle column ($2), leaving an empty row on top and bottom (@1
and @10).

Set the value of @2$2 to 365, either manually or (as below) in the table
formula. Then set the rest of the range from rows @3 down to @9 to
decrement by one from the cell above (@-1):

|   |     |   |
|   | 365 |   |
|   | 364 |   |
|   | 363 |   |
|   | 362 |   |
|   | 361 |   |
|   | 360 |   |
|   | 359 |   |
|   | 358 |   |
|   |     |   |
#+TBLFM: @2$2=365::@3$2..@9$2=@-1-1

Yours,
Christian

Uwe Brauer writes:

> Hello
>
> In most spreadsheets I know, it is possible to generate easily a column
> say starting in 365 ending in 23.[1] 
>
> Is there any way to do this in the org spreadsheet, without a  loop?
>
> thanks
>
> Uwe Brauer 
>
> Footnotes:
> [1]  (Or in matlab without a loop)

      reply	other threads:[~2014-03-25 22:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-25 19:08 spreadsheet, generate a column beg end Uwe Brauer
2014-03-25 22:30 ` Christian Moe [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=m2siq5vrm0.fsf@uio.no \
    --to=mail@christianmoe.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=oub@mat.ucm.es \
    /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).