I got range of cells with set formatting > "Date", and by default when I'm typing any number it is converted to date with day I've typed and January 1900.
How to change it so I would get always current month and year after typing just numbers of day ?
How to do this in LibreOffice Calc aswell ?
This is for Excel. This example uses the range from A1 through A10 Place the following event macro in the worksheet code area:
Because it is worksheet code, it is very easy to install and automatic to use:
If you have any concerns, first try it on a trial worksheet.
If you save the workbook, the macro will be saved with it. If you are using a version of Excel later then 2003, you must save the file as .xlsm rather than .xlsx
To remove the macro:
To learn more about macros in general, see:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
and
http://msdn.microsoft.com/en-us/library/ee814735(v=office.14).aspx
To learn more about Event Macros (worksheet code), see:
http://www.mvps.org/dmcritchie/excel/event.htm
Macros must be enabled for this to work!
The code takes your typed value and replaces it with the properly constructed date. You can change the range to suite your needs.