L
L
lpblackmesa2016-03-09 13:51:03
Google
lpblackmesa, 2016-03-09 13:51:03

How to create automatic filling of a cell next to the date of its filling in a Google spreadsheet?

Good afternoon! There was a need to implement in the Google spreadsheet automatic filling of the date cell with the date of change of the first cell of this row.
Roughly speaking, there are 2 columns A and B. It is necessary at the first filling with any cell value of the first column, for example, A1 - B1, automatically fill in with the date of entry. Yes, I wrote in cell B the code -

=IF(A3<>0;now();)

But! When I enter the tables tomorrow, of course, all fields filled with dates are automatically overwritten with a new, current, date.
How to make it so that already filled date cells are not overwritten - I could not think of. Does anyone have ready-made solutions or any thoughts?
Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Ekaterina Andreeva, 2016-03-10
@katyscarlett

maybe this will help: you can add a function to the scripts (the so-called Simple Triggers)
function onEdit(e) {
var range;
range = e.range;
if(range.getA1Notation()=="A1")
{
range.getSheet().getRange("B1").setValue(new Date());
}
}
the idea is not mine, I also came across it on the Internet

L
lpblackmesa, 2016-03-11
@lpblackmesa

Liked the idea, it seems.
True, the code goes into error
Moreover, I found a similar piece directly from developers.google.com, swears at the same place ..

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question