Re: Date arithmetic



Dave Feustel wrote:

How is date arithmetic done in Gnumeric?
I want to put a date in a cell and have 6 incremental dates generated in successive
cells in the row. So I need a function that
adds 1 to the date in the cell immediately to
the left. I didn't see any obvious way to do this
looking at the gnumeric date/time functions.
Is there a straightforward way to do this?

Thanks,
Dave Feustel
_______________________________________________
gnumeric-list mailing list
gnumeric-list gnome org
http://mail.gnome.org/mailman/listinfo/gnumeric-list
Although all you see is the date in the format you sued to enter it, you have the date as a number. Putting a date in cell A1 and the formula "=A1+1" in cell B1 will show the next date. You can copy this formula to the rest of the row. If you just want the values, you can copy the region when you are done and PasteSpecial->Value to the same location.

As another response said, you can also do this by autofilling -- dragging the lower right corner of a cell over the region you want to fill. If you autofill starting from B1 in my example, you will get that formula in all the cells. If you start from two consecutive values in A1 and B1 and select both cells, autofilling will put consecutive values in new cells. (If you try this with the data of my example, you will get something else. Exercise: do it and explain the result).

This has been around and documented since at least version 1.0.8. Consult the manual for details on entering data in many cells simultaneously or autofilling.

-- RT Bumby
  Rutgers Mathematics Department




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]