Ask Your Question

Calc automatic date on data entry

asked 2018-01-04 11:44:04 +0100

gtomorrow gravatar image

Hello all, Is it possible to automatically have a date entered in a cell when data in another cell is entered? Example: column A is awaiting data. If data is entered in say A4, I would like cell B4 to automatically enter the date of the data entry of cell A4, otherwise it would stay blank. Hope I was clear. Thanks in advance.

edit retag flag offensive close merge delete


From the beginning it wasn't specified whether a once created datestamp should be fix "forever", or should be renewed if the cell it is associated with is edited.

Lupp gravatar imageLupp ( 2019-12-28 00:18:19 +0100 )edit

2 Answers

Sort by » oldest newest most voted

answered 2018-01-04 15:26:11 +0100

Lupp gravatar image

updated 2019-12-28 00:23:58 +0100

This is a question posted in slightly different ways again and again. I will noenetheless try a new answer.

To do this based on formulas would require to permit "Iterations" (circular references) and to misuse them for purposes they are not made for. Accepting some grave complcations we can get a very fragile solution for the task this way. In specific an error changing or deleting a date-time-stamp inadvertently cannot be made undone (by Ctrl+Z e.g.)

To do it with the help of custom code ("macros") is against the grain regarding what spreadsheets essentially are made for. It is, however, possible and much less fragile / more stable.

See this demo.

===EDIT1 2019-12-27 about 21:35UTC===
Completely abandon attempts to do it with formulas. No reliable solution possible. See comment below.
===End EDIT1===
There is this slightly reworked demo.

edit flag offensive delete link more


About 2 years later I come back to this therad being reminded of it by a different one.
I take the opportunity to state that attempts based on formulas are proven again to be very fragile. The solution I gave in the above linked old demo still is working in LibO V, but does no longer work as expected in V I will not again try to find a "fix" or a workaround. Trying to do it this way simply means wasting time.
On the other hand I can confirm that the way to pass parameters to Sub via the name of a CellStyle proved suitable in this case and in some more since.

Lupp gravatar imageLupp ( 2019-12-27 22:37:03 +0100 )edit

answered 2019-12-28 00:29:33 +0100

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-01-04 11:44:04 +0100

Seen: 906 times

Last updated: Dec 28 '19