Timestamp function changing, how to fix this problem?

119 Views Asked by At

I have a problem while using script editors to creat timestamp for time out record.

Here is the function I have collected on one topic in stack when searching for a solution:

enter image description here

The problem is if I change the rows by moving, the timestamp will be automatically recorded to the new one. And this will be wrongly recorded in the Google sheet.

The example is here:

enter image description here

enter image description here

How could I stop the changing when using the function created by Script?

1

There are 1 best solutions below

2
On BEST ANSWER

Using Out() as a custom function means that it will be recalculated as per your spreadsheet settings. I believe this defaults to "on change", which is why it updates when you move the row.

As Out() is only use to provide a formatted date/time stamp, I recommend that you instead use a keyboard shortcut to enter the date/time and set the correct formatting in that column.

To insert the date and time, you can use (PC) Ctrl + Alt + Shift + ; or (Mac) ⌘ + Option + Shift + ;.