emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* spreadsheet, generate a column beg end
@ 2014-03-25 19:08 Uwe Brauer
  2014-03-25 22:30 ` Christian Moe
  0 siblings, 1 reply; 2+ messages in thread
From: Uwe Brauer @ 2014-03-25 19:08 UTC (permalink / raw)
  To: emacs-orgmode

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)

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

* Re: spreadsheet, generate a column beg end
  2014-03-25 19:08 spreadsheet, generate a column beg end Uwe Brauer
@ 2014-03-25 22:30 ` Christian Moe
  0 siblings, 0 replies; 2+ messages in thread
From: Christian Moe @ 2014-03-25 22:30 UTC (permalink / raw)
  To: Uwe Brauer; +Cc: emacs-orgmode


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)

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

end of thread, other threads:[~2014-03-25 22:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-25 19:08 spreadsheet, generate a column beg end Uwe Brauer
2014-03-25 22:30 ` Christian Moe

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