I searched and searched and SEARCHED to find the code for this EXACT thing! I simply cannot tell you HOW MUCH I appreciate you doing this VIDEO!!! I have spent endless hours to try to get this to work and could not get it! AMAZING and THANK YOU SO MUCH FOR HELPING MY SANITY! :)
@RadoHudran5 ай бұрын
I remember following this 2 years ago took me easily 3 hours or so and I got a headache. It felt like a huge achievement to complete it. Now I made this code for a new sheet and it took me 30 min, felt easy, but most importantly,; this video has proven valueable over and over. I use this code in a sheet I use weekly and it has saved me lots of time. Thanks a bunch!
@lucazarts25 Жыл бұрын
I think anyone could learn how to code with a professor like you. Congratulations and thank you for the knowledge shared!
@scott-ish4044 жыл бұрын
I love the way you explain everything by stages, without delving into too much technicalities and even makes the improvements on it easy to grasp, so that even a code-ignorant like me can follow it easily. Subscribing to your channel in 3, 2, 1...!
@Brakken993 жыл бұрын
I had an issue as many have with the ranged error. Two things - an error will be returned if you run the code from the editor OR debugger. The reason for this is the conditions of the fields are not being met on the spreadsheet side and this is normal. The other thing is recheck ALL OF YOUR SYNTAX. I chased this problem for far longer than I should have and found I had typed a "v" where a "u" should have gone in value - was too easy to miss but it looked right at a glance. Once this correction was made the code started to function correctly. Another great video by this youtuber!
@gladysgalat4992 Жыл бұрын
Hello, I had a problem with the range. What could possibly be the error? Thank you so much!
@GoTouchSomeGrassBuddy7 ай бұрын
You just taught EXACTLY what I'm searching for! Thank you!!! You explain everything clearly!
@kickinitwithk7463 жыл бұрын
I searched for hours for this solution! Your teaching methods were clear and easy to follow. Thank you.
@guyw68492 жыл бұрын
There have been a few questions on how to run the same script on more than one sheet, but not all of them. Through simple copy and paste, I quickly created multiple scripts, one for each sheet I wanted the script to run on, giving each a unique name (e.g., Script1, Script2, Script3. - I gave mine the name of the sheet they corresponded to). Note, you can only have one script named "onEdit." You will want to reserve the onEdit name for the short "master script" that will run the rest. After creating each new script, copy and paste the same code into each. Then, change the script name on the first line of code (right after "function" and before "(e)" to match the name of the new script. Then, change the sheet reference in the code located right after "getName() ===" to match the name of the sheet that script should run on. Finally, go back to your original onEdit script and delete all of the code and paste the following new code, making the onEdit script the "master script" to run the rest of them (of course, modify the script names to match your script names, adding however many scripts you have): function onEdit(e) { script1(e); script2(e); script3(e); } Remember to save the scripts. While on the onEdit master script, click "Run." The sheet-specific scripts will execute in the order they appear in your onEdit master script. I have no coding skills. But after some research, this approach worked for me.
@RadoHudran2 жыл бұрын
You might want to check this guy's vid at 3:30 kzbin.info/www/bejne/hGW5YXmQdrh-bJI He talks about the "OR" statement and how you can use it This will make your code a lot shorter and quicker to execute. I also got no coding knowledge but trust me it's easy EDIT: It's not very easy tho For it to work properly my if statement had to be: if(col === targetColumn && row >= startRow && e.source.getActiveSheet().getName() === ws ||col === targetColumn && row >= startRow && e.source.getActiveSheet().getName() === bs){ bs stands for bullsh!t as well as var bs = Sheet 2 I had to repeat almost the entire statement inside IF() So in theory you could expand this row infinitely for as many sheets as you want In the end it works, even though it's not as compact as I'd like
@mailtossundar Жыл бұрын
the way of writing codes and explanations is easily understandable to everyone thanks for this video.
@LucasFurioFranco4 жыл бұрын
I freaking love you, man! Thanks for the lesson, it works wonders! S2 Thank you, thank you a lot! I can't express how grateful I am to you right now! Best regards!
@teresalgeorge3 жыл бұрын
ME TOO!! I AM just so THANKFUL for this video ! lol I LOVE THIS MAN FOR DOING THIS!
@philippschumacher46595 жыл бұрын
Thank you very much. After watching a lot of videos regarding this, i finally found yours and understood what i did. Not just copy and paste code.
@davem453 жыл бұрын
I am so glad I stumbled on your channel this is perfect. now I have to figure out that when our receptionist receives a package, based on the tracking number it will fill in the carrier in cell 3 Thanks so much for this tutorial
@gebruikerarjan4 жыл бұрын
Great tut! Could you drop the script in the description below of your video? then you just can copy paste it. That would be easy!
@fauzanwidianto13654 жыл бұрын
Great tutorial, I have a very little experience with programming language, but you really made it for me. I do still have one question related to this timestamp method. I realized that this method only works with cell edited manually, so for example I paste 3 rows of data, it would only update timestamp for the first cell only, the second and third one wouldn't be updated. Could you please help me with this one ? Really appreciate your woks man!
@cmteclaudios2 жыл бұрын
Man, I have this problem, do you have any idea how to solve this?
@BustaCap4 жыл бұрын
I’ve learned so much from this channel it’s insane. Thanks for all your help.
@wagnerbarbosa18943 жыл бұрын
Speaking from Brasil! Simply perfect! Thank you!
@benedictchua-theredreamer Жыл бұрын
love the way you explain the script , not just typing it. for begginers like me, looking for some code for my project, thanks
@ExcelGoogleSheets Жыл бұрын
👍
@emmanuelmgbemena3 жыл бұрын
You are the best. You just helped me. Beautiful explanation
@muraly35233 жыл бұрын
Thank you very much.You are a very good teacher.
@davidhebert-y6l Жыл бұрын
thank you for sharing, all your tutorial very very very very helpful. God Bless you and Family always
@dannybans234 жыл бұрын
Thank you so much, brother! This is exactly the solution I was looking for! I was experimenting with circular reference formulas, but the date would update the following day after inputting content into adjacent cells. So I needed a different solution. I thought of using some sort of script and just searched KZbin. Thank goodness I found your video! You saved me so much time! Well done, great work! - Greeting from Toronto, Canada!
@ExcelGoogleSheets4 жыл бұрын
Glad it helped!
@soamyaashishgetengaged78814 жыл бұрын
@@ExcelGoogleSheets This only works when the owner of the sheet makes any change but if anyone enter any value then the timestamp doesnot appear. I want to create the same when anyone can enter the value
@subhamdey19222 жыл бұрын
@@ExcelGoogleSheets Can you help me with the script code?
@ali3992 жыл бұрын
@@subhamdey1922 Code.gs function onEdit(e) { addTimestamp (e); } function addTimestamp (e){ //variables I 7 R 7/16:38 Fix Date Delay > var startRow 2; = var targetColumn = 1; var ws = "My Data"; //get modified row and column var row = e. .range.getRow(); var col = e.range.getColumn(); if (col === targetColumn && row >= startRow && e.source.getActiveSheet().getName() WS var currentDate = new Date(); e.source.getActiveSheet().getRange (row, 4).setValue(currentDate); if (e.source.getActiveSheet().getRange (row, 3).getValue() ""){ e.source.getActiveSheet().getRange (row, 3).setValue(currentDate); } // END IF check if date created exists } // END IF check column, row, worksheet
@nasirshaikh27154 жыл бұрын
I really appreciate the video which you have made, it is very easier for the non-technical person to understand, thank you so much. I am the new person who is going to use this script in our master sheet and also I would like to see more videos to learn the same from scratch... :)
@Nibarger2 жыл бұрын
Very nice...I've been watching many others and you are by far the easiest to follow and understand. Thank you very much.
@ohwe0w2263 жыл бұрын
Thank you!! No coding experience whatsoever and I was able to do it!
@ExcelGoogleSheets3 жыл бұрын
Excellent!
@omarjimz4 жыл бұрын
Awesome. Not only learned to timestamp but scripting in Google Sheets. Thanks!
@saoudiabdealbaseete42393 жыл бұрын
Dude, you're the best, I wish you get everything that you want my friend
@cristinapajarillo69567 ай бұрын
Thanks so much you helped improve my project significantly! All the best!
@audiomemento2 жыл бұрын
Wow I finally got this to work thanks to your video! Super helpful and well explained.
@lovelyktott3 жыл бұрын
i really appreciate and do love everything you teach. It's so simple and easy to use in real work. I practice and really use it in my restaurant. I would like to thank you for all these knowledge. If you come to Thailand, let me know, I will guide you around enjoy Bangkok for 1 day....Thankssssssssssss my real teacher
@hoiyinwan82335 жыл бұрын
That was amazing tutorial, thank you for making this.
@JanRossi3 жыл бұрын
Totally just used this. Thank you. I feel like I kinda jumped into the advanced area. but you made it easy to follow your instructions. Thank you!
@manasgarg144 жыл бұрын
This is exactly what I'm looking for, thanks for the tutorial. Great job man! THANKS A TON !!! :)
@RonMorlan1516 Жыл бұрын
Just did a mod of this code and it worked great! Thanks for a great tutorial!
@Corigador5 жыл бұрын
Great instructions! Thanks. Is there a way to make the timestamp trigger when you paste several rows of data into the target column? Currently it only adds the timestamp to the top line where the start of the list was pasted.
@andrewjawney13 жыл бұрын
Thanks for that! Could you please add the code into the video description?
@administradordrycleanservi53212 жыл бұрын
Apreciated the good explanation, keep it up!
@travel247peru84 жыл бұрын
Congratulations ! i not speak well english, but you explain very easy and simple , thanks for your work , definettly best tutorial ever ! hugs from Perú
@samprotestchanel22524 жыл бұрын
Thanks, this is just what I was looking for. Can you please tell me how to add condition that date erases when col 1 has no data?
@gregoriusalvin1183 жыл бұрын
UPP
@pearldme74563 жыл бұрын
@@gregoriusalvin118 ???
@decenmueblesinfantiles36473 жыл бұрын
Hello! this is a great tutorial, but how to get the timestamp from when any cell from a range is modified? cant find out how to set the range beside the number of column
@scottcardais35603 жыл бұрын
This is a great tutorial and it used to work perfectly but as of 2021-11-05 it fails. The debugger says that several of the variables are "undefined". ("e", "ws", "row", "col", "currentDate") Has something changed in the scripting syntax to break this script?
@ingridrnilsen2 жыл бұрын
Just edit the code and it should be live on your Sheet. Only way to test the code is by actually editing a cell in other words, since you're running the code from inside the script editor.
@agamgumelar66052 жыл бұрын
Works like a charm, thank you so much bro!!
@ExcelGoogleSheets2 жыл бұрын
👍
@AhmedIbrahim-ct5fs5 жыл бұрын
would you please elaborate how to lock cells automatically after entry is made in sheets so that cells can't be edited after making an entry. Thanks in advance
@subratadutta45624 жыл бұрын
Nicely explained with minute details. Thanks for uploading this video. Looking forward to watch more.
@MauricioHernandez874 жыл бұрын
this script gives an error on the e.range.getRow(); TypeError: Cannot read property 'range' of undefined (line 14, file "Code")
@onewiththefreaks36644 жыл бұрын
I have had the exact same problem, but in line 15. I checked the code time and again, but I could not find an error or any reason, why this was happening. Strangely the code worked fine, until the housekeepng part with adding all these variables started. After I wrote the code a second time, it finally worked. I compared both versions, but I can not find any differences except there might be some different spaces and paragraphs. Something like this seems to be the problem. *The code works fine now! Thanks very much to this channel for all those outstanding tutorials!*
@ianpropst-campbell60284 жыл бұрын
I had the same problem.
@MauricioHernandez874 жыл бұрын
@@ianpropst-campbell6028 on the script editor go to edit and then current project triggers so you can enable on edit which is being called by the script.
@MauricioHernandez874 жыл бұрын
@@onewiththefreaks3664 on the script editor go to edit and then current project triggers so you can enable on edit which is being called by the script.
@ianpropst-campbell60284 жыл бұрын
@@MauricioHernandez87 Okay thank you!
@hellboy14882 жыл бұрын
this was very helpful and my very first exposure to any sort of code! worked perfectly thank you!
@edisonpalima4 жыл бұрын
Thank you very much. This is the exact tutorial that I'm looking for. I'm now subscribed :)
@ExcelGoogleSheets4 жыл бұрын
Thanks for the sub!
@affiqfadzil5 жыл бұрын
Great job! Clear tutorial, exactly what i'm looking for.. Thank you so much
@adeep5983 жыл бұрын
I owe my new job to this youtube channel
@madhumohan38433 жыл бұрын
It is really impressive the way he explain and can grab the attention of code ignorant people
@Degmxn4 жыл бұрын
Holy Smokes, I think I found my new teacher. Wow!!
@dennyandriansyah25603 жыл бұрын
exactly what I looking for.. thanks for tutorial.. very helpful..
@unityindualities4 жыл бұрын
Thank you so much for doing this, I love this page so much. You are contributing to something that is going to change the world, and I can't thank you enough. Thank you for all these tutorials, they have helped me insurmountably.
@bhawanishekhawat31635 жыл бұрын
Very nice video and it is very useful in companies where Google sheets are used too much, our company is completely on Gmail
@tamayonoelle884 жыл бұрын
Very informative and superb knowledge! Thank you for sharing it!
@Trackdaygenius10 ай бұрын
Awesome tutorial! Is there a way to define a range of columns?
@fjlugo9 ай бұрын
I'm chasing same answer.
@sinisamoravac84823 жыл бұрын
Works perfectly for me! Very well explained!! Thank you
@drylunch84623 жыл бұрын
Really useful info, thank you very much for posting, have now subscribed
@felixtsoy31383 жыл бұрын
Hey there, this is an incredible instruction, very detailed. Could you explain, how to apply this function to additional worksheets (but not all) in the workbook?
@christran86432 жыл бұрын
did you ever find a way to do this?
@CompSciSimplified3 жыл бұрын
Thanks man,respect for your hard work.
@sangeetarora5 ай бұрын
Very helpful and informative
@sophie81993 жыл бұрын
Are you able to advise on how to run script for multiple timestamps on one sheet? Also, for the same timestamp to only work on selected sheets...i am struggling to make either scenario to work ? Do you have videos to cover these?
@whinapomana97154 жыл бұрын
This is such a great tutorial, thank you so much!
@bangdoeltips74924 жыл бұрын
Very useful and helpful tutorial, thank you.
@mentality-monster Жыл бұрын
This is very useful. Thank you sir.
@ankitkarani20684 жыл бұрын
TypeError: Cannot read property 'range' of undefined (line 15, file "Code") Can you help me on this ?
@zitoScine4 жыл бұрын
Anyone has a solution to this? I have the same problem. Thank you!
@zitoScine4 жыл бұрын
@Octave Laurentin I figured it out; it works when you don't try to run the code in script editor but save it and go to your sheet and it'll work. Because no range is given to it until you open the active sheet in question, then the value becomes defined.
@lukasodern4 жыл бұрын
if that doesnt work, try this code: function onEdit(e) { var ss = SpreadsheetApp.getActiveSheet(); var r = ss.getActiveCell(); //1.Change 'Ark 1' to be matching your sheet name if (r.getColumn() == 4 && ss.getName()=='Ark 1') { // 2. If Edit is done in column 4 (D) And sheet name is 'Ark 1' then: var celladdress ='L'+ r.getRowIndex() ss.getRange(celladdress).setValue(new Date()).setNumberFormat("dd/MM/yyyy hh:mm");} }; Replace the 4 with the column you edit, and 'L' with the column you want your timestamp in.
@Aman.Bajwa944 жыл бұрын
@@lukasodern thnx Jan, this script worked for me..
@addydare4 жыл бұрын
Hi, just one doubt, I am copy pasting a data with multiple entries in rows, but script put a timestamp just in 1st row not the below copy pasted ones. As per my understanding this works only when onEdit triggers the cell which is edited. Can we do some changes in the script or trigger to work with the copy pasted values? Please help, in urgent need as I am working on large set of data.
@aleksandarnakevski80414 жыл бұрын
Great video! Really thorough. Is there a way to do this same type of thing but instead of a timestamp its a user-stamp based on the email of who edited the document?
@MehdiKamali13 ай бұрын
works perfectly, thank you so much for your time
@PencilBoxID5 жыл бұрын
This exactly what im looking for, thanks for the tutorial,
@manishdashsharma73815 жыл бұрын
Hello you know app scripting?
@norma-bh4vo5 ай бұрын
SO HELPFUL THANK YOU!
@kunal_chand3 жыл бұрын
Helpful as always. Brilliant!
@vivienm57193 жыл бұрын
Such great explanation and helpful information. Thanks!
@ExcelGoogleSheets3 жыл бұрын
Glad it was helpful!
@k2s3532 жыл бұрын
Thanks for that great explanation!
@RadoHudran2 жыл бұрын
Awesome, I enjoyed coding with you because it's interesting and I can't code on my own at all. Thx!
@keithmerrill40582 ай бұрын
Can i today function with this formula?
@prony51453 жыл бұрын
Great!! I have just been looking for this everywhere. Thanks a lot man.
@umamageswari32404 жыл бұрын
I did the same as you said...in edit script screen. But when I modified the rows in my spreadsheet it's not reflecting. Am I missing something?
@15weouthere103 жыл бұрын
SAME
@garricko4 жыл бұрын
Thank you for making this! This helped a lot with my simple spreadsheet.
@mostafizurrahman41103 жыл бұрын
Thank you so much brother for your helpful video.
@kamleshpatel82443 жыл бұрын
Amazingly helpful video, very easy to follow and give confidence adapt too ... thank you so much
@SmartsidSidhu3 жыл бұрын
Gr8 job bro.. Thanks a lot.. 😘
@StarsNStripesForever3 жыл бұрын
Super helpful. Thanks for the run-through!
@apljaaay3 жыл бұрын
THANK YOU FOR SHARING YOUR KNOWLEDGE MAN!!
@Xansos2 жыл бұрын
Thanks a lot for this man, exactly what i was looking for
@eptrade23234 жыл бұрын
This is quite amazing! I found a different way of doing it, it is simple, but works for me. I created a "form" with google forms..... as a question you can ask: what is the package id? and let the response be text (the id)... once the answer is submitted you can ask google forms to send the results to a google spreadsheet..... the time stamp is a default column.
Make sure everything is on the correct line as the tutorial, fixing this fixed the same issue I had when running the script.
@mictralif75154 жыл бұрын
dont run it.. just save it and then after saving test it on your sheet.
@cedricklacuarin14974 жыл бұрын
Seems you have other google accounts logged in at the same time. Do check if you are running the script in the same Google account.
@ashkanahmadi4 жыл бұрын
same problem. anyone has found a solution or figure out what the problem is?
@hermawanyulianto26454 жыл бұрын
The same...TypeError: Cannot read property 'range' of undefined (line 8, file "Code")
@kyledinwiddie99622 жыл бұрын
Fabulous tutorial. Thank you
@andrewjames27073 жыл бұрын
Awesome very helpful. Just wanted to know if there was a way to change it so the timestamp would only change when specific test was added to the cell?
@mitu60302 жыл бұрын
It worked!! Thank you so much!
@ExcelGoogleSheets2 жыл бұрын
👍
@LloydMervinNalusDaniac3 ай бұрын
Hi I appreciate your work very much, but may I know if Is there anyway I can put a time stamp in a single cell whenever changes happen to multiple range?
@brentwardle5082 жыл бұрын
Would it be possible to show how to update the "Last Modified" column timestamp when making edits to ANY of the cells in the same row without changing the original "Date Entered" column? e.g. entering a value in the Package ID, the same Date is filled to both the "Date Entered" and "Last Modified" columns. IF I enter text in the Comments column I want the "Last Modified" date to update.
@coachjohn19517 ай бұрын
I have set up for check boxes and the timestamp and the row to the right of each. Users are clicking..... check check check in quick succession. sometimes the script fails to put in the timestamp. Seems like a problem of overlapping the running of the script before it has completed the previous. Any suggestions?
@lumberdesign44014 жыл бұрын
Very Helpful Tutorial!
@carloumali34174 жыл бұрын
great tutorial, easy to understand! I tried it myself and it works!
@kerella23212 жыл бұрын
This is perfect! But is there a script wherein whenever there is a change, it'll have an automatic copy of the previous data?
@davidchoi38692 жыл бұрын
U R A GOD to me Right now absolute Awesomeness & Happy Thoughts Thank U So Much!!!
@eiger675 жыл бұрын
Thank you 4 that, a further implementation would be, to avoid users to make changes on modified columns...do you think would be an option to check if the "Session.getActiveUser().getEmail();" is not the spreadsheet owner? thank you again
@xGSTQ5 жыл бұрын
Can you not just lock the modified columns?
@travisnemec77642 жыл бұрын
How would the script look different if I wanted to have an auto time stamp on two separate tabs?
@najmuddinazik4 жыл бұрын
Thank you so much. I follow step by step and make it! God bless you for helping🙏🏼☺️
@jayrodathome11 ай бұрын
FYI you can also easily add a timestamp by using Lamda instead of Appscript. For example. Assuming A1 is a Checkbox (true/false) then you could use this formula =LAMBDA(now,cell,if(cell,now,))(now(),A1) which will print the time whenever that checkbox is checked off and it is static. It will not change onEdit or refresh. It will only update when you click the checkbox. Now you can change the logic to whatever I'm just using the checkbox as an example. I believe this is a newer feature in google sheets.