Hi Kaushal Modi <kaushal.modi <at> gmail.com> writes:
> > Hi, > I am trying to get auto-incrementing numbers in the first column in an org table. The goal is to recalculate the numbers after adding/removing rows. > > I checked out the org FAQ: http://orgmode.org/worg/org-faq.html#fill-table-column-with-incremental-numbers > > > But I am still not getting it to work as I need to. > > Below is the minimum working example. Paste the below in an org buffer. > > > > | N | | > |---+---| > | | | > | | | > | | | > | | | > #+TBLFM: $1= <at> -1+1:: <at> 2$1=1 > > Try this | N | | |---+---| | | | | | | | | | | | | #+TBLFM: <at>$1..<at>>$1= <at>-1 + 1:: <at>2$1=1 One problem is that $1 also includes the first row with the "N" heading. that is why in your example the second and third lines both will at first contain 1 (at least with my org version 8.3.3), and in the second iteration only show the correct series. > Now with the point anywhere in the table, when I hit "C-c *" or M-x org-table-recalculate, I expect the first column to be auto-populated with numbers 1,2,3,4 (or that's how I understood from the tutorial in the FAQ link above). > > But it does not work that way. Instead I need to go to each row and hit C-c *. Placing point on the TBLFM line and doing C-c C-c should recalculate the whole table. Cheers, Derek