Create Google Sheets Updated Date Column

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Google Apps Script Code in Video Below:

function onEdit(e) {

var range = e.range;
var spreadSheet = e.source;
var sheetName =
var row = range.getRow();

if(sheetName == 'DATA')
{
var new_date = new Date();
spreadSheet.getActiveSheet().getRange(row, 6).setValue(new_date).setNumberFormat("MM/dd/yyyy hh:mm:ss A/P");
}

}

CodeWithCurt
Автор

Thank you for the great script. After getting it working, I realized I had to edit the header text on the row I was writing the date in. This caused it to put the updated date instead of taking my header title. I modified the script so it checks to see if the row you are working in is 1 and if so, it just drops through. See below

function onEdit(e) {

var range = e.range;
var spreadSheet = e.source;
var sheetName =
var row = range.getRow();
if(value.row > 1);
{
if(sheetName == 'Data')
{
var new_date = new Date();
spreadSheet.getActiveSheet().getRange(row, 6).setValue(new_date).setNumberFormat("MM/dd/yyyy hh:mm:ss A/P");
}
}

}

Hope this helps someone!

aaronstone
Автор

Thank you so much for sharing those helpful videos!

How can I prevent from the colum headline (UPDATED DATE) to also change once I elite the other columns names? Thanks!

RoseTheB
Автор

Thanks a lot!
One question please, what is I want to specify the range of cells/columns that I want to auto-date them
Means I don't want to have an updated for any change in the sheet, I want it for a specific range

nooralmamoory
Автор

can we do it for specific cell edit, instead of complete row?

tejraj
Автор

Hallelujah. THANK YOU!!! Explained so simply.

michaelburns
Автор

Very helpful!! Thank you so much. Will always be waiting for a new video tutorial from your channel :)

Mary-fdqn
Автор

This is so freaking helpful. Thank you so much!

EricDuPont-jthy
Автор

Man you are doing grate Job. Really love your work.

asadabbas
Автор

Hello, good tutorial. How would I make it so that the top row isn't changing? Everytime I click on the header row, it changes my "Updated Date" text to a date.. Is there a solution to this? Thanks.

simonochoa
Автор

How to show “Last edited” date and user on cell value in another cell/column in Google Sheets?

LieNuk
Автор

Hello there, love your video...simple and to the point. I do have a question for you...using your example, when you update the miles, it timestamps, if you go back and update it again, will that overwrite the previous date? If yes, is it possible to control the date entered initially and show modified date in a separate column?

Beanify
Автор

Hey Code with Curt
Your video is really helpful and easy to understand and most importantly it WORKSSS!
But instead of row i want it to use on the column. When the timestamp has to change when there is an change in the column
What changes do i have to make to do that??
Please help🙏

shivali.tiwari
Автор

WORKED GREAT! Is there, by chance, a way to add a line to the code to get an email notification when a user updates the table?

chrisvideo
Автор

i want the date to change only when i modify on a particular Column, what do i change in the code ?

HappyBargain
Автор

thank you for the video. do you know a way if i wanted only a cell to display the updated date whenever any cells in a given table were edited? i found a formula =IFERROR(SUM(C4:N28)+"X", TODAY()) but it display today's date even though i didn't change anything

PiPuPiPu
Автор

Thank you so much for the script. It helps a lot to manage my team.

Could I have the GG Sheet auto-update the Dates based on a certain column input only?

timnguyen
Автор

Thanks for the wonderful code, I have observed 1 issue here, If we paste values in multiple cells the date is updated for only the first row. Is there any way to update all the rows?

saiprasad
Автор

Hi guys, great function. Please can you tell me how to "copy" this function for more columns? I just want to have a date of change of each of 6 colums separately. Many thanks!

robertbohunek
Автор

Hi Sir, this script not running when i shared the spreadsheet to other, and not reflecting the timestamps who are edit the cells, its working only with my mail Id only, what i do ?

karthik.a