Google Sheets - Add Timestamp When Cell Changes - Apps Script

Поділитися
Вставка
  • Опубліковано 26 лип 2024
  • Learn how to create a script to add a timestamp when cell is updated in Google Sheets.

КОМЕНТАРІ • 776

  • @scott-ish404
    @scott-ish404 3 роки тому +20

    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...!

  • @teresalgeorge
    @teresalgeorge 3 роки тому +12

    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! :)

  • @kickinitwithk746
    @kickinitwithk746 3 роки тому +2

    I searched for hours for this solution! Your teaching methods were clear and easy to follow. Thank you.

  • @lucazarts25
    @lucazarts25 Рік тому +2

    I think anyone could learn how to code with a professor like you. Congratulations and thank you for the knowledge shared!

  • @Brakken99
    @Brakken99 3 роки тому +5

    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
      @gladysgalat4992 Рік тому

      Hello, I had a problem with the range. What could possibly be the error? Thank you so much!

  • @LucasFurioFranco
    @LucasFurioFranco 4 роки тому +20

    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!

    • @teresalgeorge
      @teresalgeorge 3 роки тому +1

      ME TOO!! I AM just so THANKFUL for this video ! lol I LOVE THIS MAN FOR DOING THIS!

  • @philippschumacher4659
    @philippschumacher4659 4 роки тому +4

    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.

  • @BustaCap
    @BustaCap 4 роки тому +4

    I’ve learned so much from this channel it’s insane. Thanks for all your help.

  • @JanRossi
    @JanRossi 3 роки тому

    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!

  • @manasgarg14
    @manasgarg14 4 роки тому +7

    This is exactly what I'm looking for, thanks for the tutorial. Great job man!
    THANKS A TON !!! :)

  • @RadoHudran
    @RadoHudran 29 днів тому

    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!

  • @nasirshaikh2715
    @nasirshaikh2715 4 роки тому +1

    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... :)

  • @unityindualities
    @unityindualities 4 роки тому +1

    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.

  • @hoiyinwan8233
    @hoiyinwan8233 4 роки тому +20

    That was amazing tutorial, thank you for making this.

  • @affiqfadzil
    @affiqfadzil 4 роки тому +3

    Great job! Clear tutorial, exactly what i'm looking for.. Thank you so much

  • @GoTouchSomeGrassBuddy
    @GoTouchSomeGrassBuddy 3 місяці тому

    You just taught EXACTLY what I'm searching for! Thank you!!! You explain everything clearly!

  • @davem45
    @davem45 3 роки тому +1

    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

  • @subratadutta4562
    @subratadutta4562 4 роки тому

    Nicely explained with minute details. Thanks for uploading this video. Looking forward to watch more.

  • @whinapomana9715
    @whinapomana9715 4 роки тому +5

    This is such a great tutorial, thank you so much!

  • @omarjimz
    @omarjimz 4 роки тому

    Awesome. Not only learned to timestamp but scripting in Google Sheets. Thanks!

  • @Nibarger
    @Nibarger Рік тому

    Very nice...I've been watching many others and you are by far the easiest to follow and understand. Thank you very much.

  • @wagnerbarbosa1894
    @wagnerbarbosa1894 3 роки тому +1

    Speaking from Brasil! Simply perfect! Thank you!

  • @garricko
    @garricko 4 роки тому +1

    Thank you for making this! This helped a lot with my simple spreadsheet.

  • @dannybans23
    @dannybans23 4 роки тому +2

    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 UA-cam. Thank goodness I found your video! You saved me so much time! Well done, great work!
    - Greeting from Toronto, Canada!

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 роки тому +1

      Glad it helped!

    • @soamyaashishgetengaged7881
      @soamyaashishgetengaged7881 4 роки тому +3

      @@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

    • @subhamdey1922
      @subhamdey1922 2 роки тому

      @@ExcelGoogleSheets Can you help me with the script code?

    • @ali399
      @ali399 Рік тому

      @@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

  • @carloumali3417
    @carloumali3417 3 роки тому

    great tutorial, easy to understand! I tried it myself and it works!

  • @tamayonoelle88
    @tamayonoelle88 3 роки тому +1

    Very informative and superb knowledge! Thank you for sharing it!

  • @najmuddinazik
    @najmuddinazik 4 роки тому

    Thank you so much. I follow step by step and make it! God bless you for helping🙏🏼☺️

  • @kamleshpatel8244
    @kamleshpatel8244 3 роки тому

    Amazingly helpful video, very easy to follow and give confidence adapt too ... thank you so much

  • @osamachoudary4379
    @osamachoudary4379 4 роки тому

    Thank you very much, this is an amazing tutorial. Learned soo much from it. Thumbs up (Y)

  • @prony5145
    @prony5145 3 роки тому

    Great!! I have just been looking for this everywhere. Thanks a lot man.

  • @sinisamoravac8482
    @sinisamoravac8482 3 роки тому

    Works perfectly for me! Very well explained!! Thank you

  • @audiomemento
    @audiomemento Рік тому +1

    Wow I finally got this to work thanks to your video! Super helpful and well explained.

  • @travel247peru8
    @travel247peru8 4 роки тому

    Congratulations ! i not speak well english, but you explain very easy and simple , thanks for your work , definettly best tutorial ever ! hugs from Perú

  • @edisonpalima
    @edisonpalima 4 роки тому +2

    Thank you very much. This is the exact tutorial that I'm looking for. I'm now subscribed :)

  • @eptrade2323
    @eptrade2323 4 роки тому

    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.

  • @apljaaay
    @apljaaay 3 роки тому +1

    THANK YOU FOR SHARING YOUR KNOWLEDGE MAN!!

  • @lovelyktott
    @lovelyktott 3 роки тому

    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

  • @saoudiabdealbaseete4239
    @saoudiabdealbaseete4239 3 роки тому +1

    Dude, you're the best, I wish you get everything that you want my friend

  • @StarsNStripesForever
    @StarsNStripesForever 2 роки тому

    Super helpful. Thanks for the run-through!

  • @jamessteffen4705
    @jamessteffen4705 4 роки тому +1

    Thank you, super helpful. Great Job!!!

  • @faktadantipsunik
    @faktadantipsunik 4 роки тому +1

    You're doing a great job. Thank you...

  • @ohwe0w226
    @ohwe0w226 3 роки тому

    Thank you!! No coding experience whatsoever and I was able to do it!

  • @jogifrh
    @jogifrh 2 роки тому

    Simple and useful tutorial! Thanks.

  • @PencilBoxID
    @PencilBoxID 4 роки тому +5

    This exactly what im looking for, thanks for the tutorial,

  • @bangdoeltips7492
    @bangdoeltips7492 3 роки тому +1

    Very useful and helpful tutorial, thank you.

  • @guyw6849
    @guyw6849 Рік тому +5

    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.

    • @RadoHudran
      @RadoHudran Рік тому

      You might want to check this guy's vid at 3:30
      ua-cam.com/video/N4V0FZASK60/v-deo.html
      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

  • @hellboy1488
    @hellboy1488 2 роки тому

    this was very helpful and my very first exposure to any sort of code! worked perfectly thank you!

  • @Azraelsky1
    @Azraelsky1 4 роки тому

    I have no words... Thank you so much!

  • @dennyandriansyah2560
    @dennyandriansyah2560 3 роки тому +1

    exactly what I looking for.. thanks for tutorial.. very helpful..

  • @drylunch8462
    @drylunch8462 3 роки тому +1

    Really useful info, thank you very much for posting, have now subscribed

  • @bhawanishekhawat3163
    @bhawanishekhawat3163 4 роки тому

    Very nice video and it is very useful in companies where Google sheets are used too much, our company is completely on Gmail

  • @kunal_chand
    @kunal_chand 3 роки тому +1

    Helpful as always. Brilliant!

  • @RadoHudran
    @RadoHudran 2 роки тому

    Awesome, I enjoyed coding with you because it's interesting and I can't code on my own at all.
    Thx!

  • @DavidMacKayE
    @DavidMacKayE 4 роки тому +7

    Holy Smokes, I think I found my new teacher. Wow!!

  • @CompSciSimplified
    @CompSciSimplified 3 роки тому +1

    Thanks man,respect for your hard work.

  • @emmanuelmgbemena
    @emmanuelmgbemena 3 роки тому +1

    You are the best. You just helped me. Beautiful explanation

  • @cristinapajarillo6956
    @cristinapajarillo6956 3 місяці тому

    Thanks so much you helped improve my project significantly! All the best!

  • @mailtossundar
    @mailtossundar Рік тому

    the way of writing codes and explanations is easily understandable to everyone thanks for this video.

  • @anvarnazar6545
    @anvarnazar6545 3 роки тому

    Thanks a ton for this tut. Saved my day

  • @stephenmatheny9933
    @stephenmatheny9933 4 роки тому

    You're the best man, thank you!!

  • @KuroNoSatsujin
    @KuroNoSatsujin 4 роки тому

    Awesome, man! Regards from Brazil

  • @johnglover3515
    @johnglover3515 4 роки тому

    Thanks so much this was an awesome well worded easy to follow tutorial. A+++

  • @xGSTQ
    @xGSTQ 4 роки тому

    Thanks for this, trying to learn Apps Script :)

  • @RonMorlan1516
    @RonMorlan1516 11 місяців тому

    Just did a mod of this code and it worked great! Thanks for a great tutorial!

  • @EnriqueGonzalezOrtiz
    @EnriqueGonzalezOrtiz 4 роки тому

    Really interesting. Thanks so much!!

  • @lumberdesign4401
    @lumberdesign4401 4 роки тому +1

    Very Helpful Tutorial!

  • @muraly3523
    @muraly3523 2 роки тому +1

    Thank you very much.You are a very good teacher.

  • @Xansos
    @Xansos 2 роки тому

    Thanks a lot for this man, exactly what i was looking for

  • @benedictchua-theredreamer
    @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

  • @vivienm5719
    @vivienm5719 3 роки тому

    Such great explanation and helpful information. Thanks!

  • @patrickstenger2316
    @patrickstenger2316 3 роки тому

    Thank You so much. very well explained. and useful.

  • @user-zw6bw3kt7j
    @user-zw6bw3kt7j Рік тому

    thank you for sharing, all your tutorial very very very very helpful. God Bless you and Family always

  • @gebruikerarjan
    @gebruikerarjan 4 роки тому +6

    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!

  • @administradordrycleanservi5321

    Apreciated the good explanation, keep it up!

  • @RebelPrinceTrys
    @RebelPrinceTrys 4 роки тому

    This really worked-- thank you so much!!!!!!!

  • @aunga.8218
    @aunga.8218 4 роки тому

    Thank a lot. This video save my time

  • @francoisdupreez6074
    @francoisdupreez6074 4 роки тому

    Very helpful thanks a million!!

  • @anjanamihiran8665
    @anjanamihiran8665 4 роки тому

    This is such a great tutorial.

  • @mostafizurrahman4110
    @mostafizurrahman4110 3 роки тому

    Thank you so much brother for your helpful video.

  • @k2s353
    @k2s353 2 роки тому

    Thanks for that great explanation!

  • @49findus
    @49findus 4 роки тому

    Very good tutorial! Thank you :)

  • @dennis.teevee
    @dennis.teevee 4 роки тому

    You're awesome! Thank you!

  • @Mikarevival
    @Mikarevival 4 роки тому

    Great Job!! Thanks!

  • @fauzanwidianto1365
    @fauzanwidianto1365 4 роки тому +10

    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!

    • @cmteclaudios
      @cmteclaudios Рік тому

      Man, I have this problem, do you have any idea how to solve this?

  • @agamgumelar6605
    @agamgumelar6605 Рік тому +1

    Works like a charm, thank you so much bro!!

  • @kyledinwiddie9962
    @kyledinwiddie9962 2 роки тому

    Fabulous tutorial.
    Thank you

  • @davidchoi3869
    @davidchoi3869 Рік тому

    U R A GOD to me Right now absolute Awesomeness & Happy Thoughts
    Thank U So Much!!!

  • @benjaminalonso4630
    @benjaminalonso4630 4 роки тому

    muchas gracias, ya tenía un modelo de script en GAS, para hacer funcionar registros de modificación, me andaban bien, hasta que la hoja tuvo que albergar a varios agentes haciendo modificaciones, espero que ahora con esta forma de registro, pueda funciona, probaré ahora mismo en mi hoja, muchas gracias por ayudarme a simplificar !!!

  • @Corigador
    @Corigador 4 роки тому +3

    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.

  • @anurajms
    @anurajms 3 роки тому

    thank you. its really helpful

  • @AndyMcProducer
    @AndyMcProducer 2 роки тому

    Great easy to understand video, def subbing.

  • @Excellent625
    @Excellent625 4 роки тому +1

    Hi,
    Thank you a million for all perfect lessons you did. It is just very amazing. I have a query, Is it possible to add the user name as well?

  • @stg134
    @stg134 3 роки тому +1

    Gr8 job bro.. Thanks a lot.. 😘

  • @cryptowannabenoob
    @cryptowannabenoob 4 роки тому

    nice, learned a lot, thanks buddy.

  • @carmencastro5512
    @carmencastro5512 4 роки тому

    you are an angel! thank you for sharing this , I was looking for it !!!

    • @manishdashsharma7381
      @manishdashsharma7381 4 роки тому

      hello you know app scripting
      ?

    • @carmencastro5512
      @carmencastro5512 4 роки тому

      @@manishdashsharma7381 Still learning

    • @manishdashsharma7381
      @manishdashsharma7381 4 роки тому

      I have problem to solve can you help me, if you wish .

    • @carmencastro5512
      @carmencastro5512 4 роки тому

      @@manishdashsharma7381 seriusly? Im not good at this, but If I can help You I will do 😊

    • @manishdashsharma7381
      @manishdashsharma7381 4 роки тому

      I am currently working on app scripting as i am new to it i am facing some difficulties . I will be thankful if you could help me .
      My question is :
      There is two columns A and B .
      A has some id's and B has version which is initially zero.
      I want to search an id , id it is found then the version will be set to 1 . If again i am searching the same id the version will be 2 .
      Thank you in advance

  • @vaibhavkhaire7014
    @vaibhavkhaire7014 3 роки тому +1

    Awesome. Thank you so much

  • @SergiuPoenaru
    @SergiuPoenaru 2 роки тому

    Thanks, man, you're awesome!

  • @mentality-monster
    @mentality-monster Рік тому

    This is very useful. Thank you sir.

  • @ewensytri3164
    @ewensytri3164 4 роки тому +1

    Amazing tutorial, Can you make another video about date stamp but with multiple sheet with different layout and multiple Columns that have a dedicated date stamp column for each?

  • @mr_shanes
    @mr_shanes 2 роки тому

    suggestion: to suit the context of a package ID and comments, which might instead be something like "Status" (en route, delivered, etc), the script would be better suited to monitor column 2 (because a package ID wont change, but its status will).