andmarti1424 / sc-im

sc-im - Spreadsheet Calculator Improvised -- An ncurses spreadsheet program for terminal
Other
4.79k stars 202 forks source link

How do I autofill dates like in excel/libreoffice calc? #707

Open kalyan860 opened 2 years ago

kalyan860 commented 2 years ago

I tried doing this using fill function using the numerical value of current date as the initial value and then incrementing it by 1 in the subsequent cells and then converting the resultant numbers to date format. But this is not working.

Is there an easier or better way?

andmarti1424 commented 2 years ago

Hello. Try increasing it by 86400, instead by 1. That's the number of seconds in a day.

kalyan860 commented 2 years ago

But then I have to rewrite the function everytime I went to add new dates?
Is there a shortcut to copy formula of above cell or to autofill down a column upto the visual selection? Thanks

andmarti1424 commented 2 years ago

You can select the cell that hast the formula and yank it with yy. Then select the desired range in visual mode and press P.. The formula should be pasted over the selected range.