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 = spreadSheet.getActiveSheet().getName(); 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"); } }
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!
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
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🙏
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.
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 ?
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!
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?
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?
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?
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
I have an issue, If i made a mistake and i dont want a row updated, i cant undo and it keeps updating to today's date, How can i change so that i can just undo if i accidently update the wrong thing. BTW good video
I've multiple sheets (with different number of columns)in a file in google sheet & want to have a sheet which automatically contains date & time on which every other sheets was last edited. how this can be done..???
Thanks for your video, I tried to change only on a column change changed if(sheetName == 'DATA') with var column = cell.getColumn(); if(column == 2) But is not working... can this be made? Thanks in advance
Really helpfull sir but how can I change the mm/dd/yyyy hh,mm,ss set to philippine time? The code was usefull but it appears that the time sets on the america
@@lopezarias I don't know why, but I finally got it to work by changing my sheet's name to something else. Make sure you change Line 8 as well. if(sheetName == 'NAMEHERE') NAMEHERE should be your Sheet's name. I didn't have to edit Line 3 at all. Not sure if it was just coincidence, but it finally worked for me.
Google Apps Script Code in Video Below:
function onEdit(e) {
var range = e.range;
var spreadSheet = e.source;
var sheetName = spreadSheet.getActiveSheet().getName();
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");
}
}
Sir.. i got error :
TypeError: Cannot read property 'range' of undefined
the error on var range = e.range;
@@anwarbinmaranmoe9319 did you ever solve this?
@@anwarbinmaranmoe9319 i also got this error
it worked for my old sheet but when I started another sheet, it is giving me an error on range and I changed the sheet name already
Is it possible to apply a formula instead of date ?
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 = spreadSheet.getActiveSheet().getName();
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!
when I ran debug, it says e,,range,spreadSheet, sheetName, row, new_date all are undefined.
man thx alot! but for me "if(value.row > 1); "not working. I do "and" statement
change if(sheetName == 'Data') to if(sheetName == 'Data' && row > 1)
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!
Hallelujah. THANK YOU!!! Explained so simply.
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
This is so freaking helpful. Thank you so much!
Very helpful!! Thank you so much. Will always be waiting for a new video tutorial from your channel :)
can we do it for specific cell edit, instead of complete row?
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?
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🙏
Man you are doing grate Job. Really love your work.
Good job Curt! Thanks man :)
Thanks man you're a lifesaver!
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.
On the If statement change to this:
if(sheetName == 'DATA' && row > 1)
How to show “Last edited” date and user on cell value in another cell/column in Google Sheets?
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 ?
i want the date to change only when i modify on a particular Column, what do i change in the code ?
ALLAH BLESS YOU FRIEND IT'S VERY EDUCATIONAL AND OBVIOUSLY OF MY USE
THANKS
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!
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?
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?
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?
Thanks Curt!
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
Thanks so much for the video!
Error
TypeError: Cannot read property 'range' of undefined
Hey. Did you find a fix on this? im having the same issue.
@@lopezarias Change the "Date" field to the name of your sheet, and also change the number of cells in the row (I write more for the next viewers)
I got this to work! Is there any way to make it work for every sheet instead of having the specific if(sheetName == ' ' ) ?
I have an issue, If i made a mistake and i dont want a row updated, i cant undo and it keeps updating to today's date, How can i change so that i can just undo if i accidently update the wrong thing. BTW good video
@Code With Curt, Could you please help with the above query? Thanks in advance!
Is there a way to add a timestamp for when the sheet row or column was created?
the problem arises when input form with submit via apps script, timestamp not created. how to modify this scripts?
Works great! however if i remove an entry in that row it wont let me delete the date, it'll keep reappearing
THANK YOU FOR THIS VIDEO
How can we find time for a specific each column wise? Can we help me to finish my project
Thank you!
So I want a query (not on App Script) that populates with a date time format to be reformatted with a different date time format - how do I do that?
Something odd is happening for me, when I edit something in the bottom row, it updates the date on several rows above it as well.
I've multiple sheets (with different number of columns)in a file in google sheet & want to have a sheet which automatically contains date & time on which every other sheets was last edited.
how this can be done..???
Is there a way to prevent it from adding the date when a new row is created?
i like you video and it realyful is ther a program about every sheet that channge date and then after editing can be save as pdf file?
Thanks for your video, I tried to change only on a column change
changed
if(sheetName == 'DATA')
with
var column = cell.getColumn();
if(column == 2)
But is not working... can this be made?
Thanks in advance
is it possible to instead of date it will say "updated 1 day ago"
What part of code should i modify if i want updated date populated ONLY if a specific column changed NOT ANY COLUMN
Thank you
Example would be for column 2. Add variable:
var column = range.getColumn();
if(sheetName == 'DATA' && column == 2)
@@CodeWithCurt Thank you so much 🙏
@@CodeWithCurt Unfortunately, it's not working. Nothing happens when I change or add something in column 2.
@@CodeWithCurt You're awesome! Please keep on making these great contents.
With "show edit history" where does the name come from? Mine just says "All anonymous users".
Wow nice video
Thank you
Ohhh thanks broo
Really helpfull sir but how can I change the mm/dd/yyyy hh,mm,ss set to philippine time?
The code was usefull but it appears that the time sets on the america
i believe it's based on your google account's timezone. so you'd have to change your timezone to philippines' if you want to use this unedited code
For me, now: Menu "File" -> Item "Settings" -> Tab "General" -> Section "Time zone"
how do i make this to many sheets?
thanks
What if other people on my sheet?
Automatic cell lok After data entr google sheet plz tell
Cannot read property 'range' of undefined (line 3, file "Code"
can you help me this?
@@fmcourses6293 Hey. Did you find a fix on this? im having the same issue.
@@lopezarias Change the "Date" field to the name of your sheet, and also change the number of cells in the row (I write more for the next viewers)
@@fmcourses6293 Change the "Date" field to the name of your sheet, and also change the number of cells in the row (I write more for the next viewers)
@@lopezarias I don't know why, but I finally got it to work by changing my sheet's name to something else. Make sure you change Line 8 as well.
if(sheetName == 'NAMEHERE')
NAMEHERE should be your Sheet's name.
I didn't have to edit Line 3 at all. Not sure if it was just coincidence, but it finally worked for me.
hi
Thanks man!