Sheet Code · Lesson 23 of 62

Bjarne Asks: Can I show the Last Time of the Last Edit in a sheet?

Members-only tutorial

Watch the video and get the practice sheet with membership.

Unlock tutorials
Practice sheet Copy sheet Preview Open Sheet resources unlock with membership.
ow do I show the date and time for the last time something was changed in a sheet? So what's interesting is that this This shows you Google Sheets shows an version history up here and shows you the last edit, but sometimes we want to have that data available to us inside of the sheet.
31 formulas linked inline Click any highlighted terms to learn more.

<div>&nbsp;Hello. So Bjorn asked, how do I show the date and time for the last time something was changed in a sheet? So what's interesting is that this This shows you Google Sheets shows an version history up here and shows you the last edit, but sometimes we want to have that data available to us inside of the sheet.<br><br>Maybe we want to email that to ourselves every day and say, you know, when was the last edit? Maybe we want to use this for some kind of time functions . Google Sheets Interface Changes Timestamp Last Change of Row Track Anything! In a Google Sheet How to See Version History in Google Sheets

I, you know, prepared time sheets in, in, in Google Sheets before, and you wanna know just in case somebody.&nbsp; enter some data and doesn't, you know, notate the time.<br><br> Sort of a backup. So I, I totally understand there's some interesting use cases for having the last edit actually in in the sheet. Also, this last edit was made seven minutes ago. Doesn't actually tell me the date or the time. It just says how much time and, and obviously it's for fi history. I can do it here, but I wanna know the actual date.<br><br>And I, I want to know the actual time of the last edit. Google Sheets Interface Changes Timestamp Last Change of Row Auto Sort By Last Edited Date

So here's what I did to get this. So I just made a little tab called data .&nbsp; and I have this, let's let's make some edits. You know, you have the equals now. Thing that gives you a date of time of now, but that doesn't really solve our problem.<br><br>Right? What if we want to actually edit now and then see when that was? So right up here it says, last edit was seconds ago. We go back to our data and it shows 1 15 48, which is pretty much the time that we just edited. So how does this, how does this, . Okay. It's a script. Auto Sort By Last Edited Date

And you'll have access if you're better sheets.<br><br>Remember you have access to the script. I'll share that in the description below. But let's see. It's a few lines and it's pretty interesting. We use the built-in function of on edit. So we use a built-in function of oned, and this means that this will run literally every time you edit. And if you wanna add more on edits put more functions down here within this function on edit.<br><br>If you want to do more things, there's lots of things you might wanna do on an edit. What Can You Automate in Google Sheets? Every single trigger available to Google Sheet users Automation is not Magic

Sometimes you want to add timestamps at particular places next to sheets. We've done that in some other videos. Sometimes you want to do execute something on edit but you put them all within the same function .<br><br>Okay? But this function in particular is four lines. So we say we just wanna grab the spreadsheet app. We just wanna know, okay. , this is the spreadsheet we're working on, the active spreadsheet . I get this spreadsheet by name because this edit can be done on any sheet. Getting Started Coding in Apps Script Timestamp When Done on Certain Sheet Automation is not Magic

If you are looking to say, have one of these on every sheet, you, you have to create an if around this and you say, you know, if I won't do it now, but it's a little bit more complicated where you say, basically get this sheet and you know, if sheet.<br><br>Is equal to data , you know, and then do it on the data tab. But but I'm not gonna do that. This is actually wrong here, but I'm not gonna do that right now. What we're gonna do now is then we get this, the data sheet. Now we get the cell, which is a two. Create a Sheet of Sheets for Project Management and/or Data Management Getting Started Coding in Apps Script Add New Task when Task Completed

So I literally am hard coding this in this to say a two on data .<br><br>And that's all that means is, okay, where am I gonna set the value? It's gonna be on data in a two. This get range and what am I gonna set? I'm gonna set a value, and that's new date. This new date is a timestamp . And that gives us that information of editing. And so if I change anything here, you know, maybe I change this to summary.<br><br>Oops. Summary. , I'm gonna save that. And now it's not gonna work because there's no summary. So just put some kind of edit here. Writer Better Prompts Autofill Date on Edit in Multiple Columns

It's not changing this, but if I suddenly change this to summary and then go edit. Now this should and it edits it right here now 18 1 18 1 18:00 PM So now every time I edit, it's gonna change this.<br><br>So if you want to use. Code. Also, I can make this more uniform here that doesn't actually change anything in the code, but you can change your range and say, you know, a 10 there. That's how you change. Now it's gonna go to actually add those. Let's just edit the sheet. And there it is in a 10. Okay, so you can now I have to format this actually.<br><br>So that's one more step. 80 Years In 1 Spreadsheet Autofill Date on Edit in Multiple Columns

You need to make sure you do format number and you want date time there, so make sure you well, Edit your no edit, sorry, format your timestamp in the proper way. You wanna actually see it, you can format it in any number of ways if you want to use that data for something else.<br><br>And see, this is last edit was seconds ago, but we know it was actually this particular date and time. Hopefully that was helpful and you should be able to get access to this sheet. And you can copy and paste this function over here. Just go over to. How To Create a Stop Watch in Google Sheets Timestamp Last Change of Row How to Insert Timestamp in Google Sheets

This add last edited timestamp sheet in the description below.<br><br>If you're a better sheets member, go to tools, go to script editor , and that will bring you here and you can copy this and add it to your sheet. Thank you. Bye.</div> How To Create a Stop Watch in Google Sheets Timestamp When Done on Certain Sheet Auto Sort By Last Edited Date

Apps Script APIs used

Sheet Stories / Video Notes + ADDED: Email Notifications 00:00:00 ChatGPT Clone in Google Sheets Part 2 Enter Google Drive File Name Get URL Fast FAQS Create an Internal Google Sheets Add-on Tweet From a Sheet Why Different Cell References in AI Integration in Sheets? Show Sheet Tabs Based on Edit Add Title Case to Google Sheets How to Power Testimonials with Google Forms and Sheets Getting Started Coding in Apps Script Seek Errors When Coding Apps Script Think Like a Programmer: Develop The Mindset of an Apps Script Coder ChatGPT Clone in Google Sheets Part 1 Embed a Number in a Website from a Google Sheet Create Navigation Like A Book or Presentation Add Click Tracking To Your Google Sheets | Bitly in a Google Sheet 00:29:08 Hold a Giveaway Raffle in a Google Sheet Capture Emails from Website Form to a Google Sheet (Without Zapier) Embed a Headline in a Website from Google Sheets Quickstart Tutorial OpenAI API in Google Sheets Create a new Spreadsheet from just a Name in a Sheet. 00:05:21 Bjarne Asks: Can I show the Last Time of the Last Edit in a sheet? 00:05:43 Email Yourself a Cell from a Google Sheet, Every Day OpenSea Data Inside Sheets Create an Email Campaign Stats Calculator 00:35:13 Twitter App Clone in a Google Sheet Dylan Asks: How to Automatically Delete Rows If Cell Contains Value Highlight Row as You Move Your Cell Selection Create a Timer with Apps Script LinkTree in a Google Sheet 00:11:22 Password Protecting Data In a Google Sheet Automatic Weekly Backup of Google Sheets Create a CPM Custom Function (Create Better Calculators!) Move Entire Row when a Cell is changed to "Yes" - The $75,000 Google Script 00:12:29 What Can You Automate in Google Sheets? Every single trigger available to Google Sheet users Sync Two Tabs Without ImportRange() Google Sheets Stories? No! But we'll add timestamped video notes to your google sheets. 00:00:00 Password Protecting Data In a Google Sheet Part 2 The Basics Benoit Asks: How to Convert Case 00:07:35 Learn to Code in Google Sheets, For Programmers How To Improve: 1,000 Business ideas: Business Idea Generator 00:11:20 Add a Checkbox to Turn on Dark Mode 00:05:10 Write Your First Script 00:08:31 Find Keywords in Any Column. Create quick search dropdown to find keywords 00:09:37 Basic CRM - Add a Powerful Script To Move Row Based on Status Let's Make a Bookmarklet! 00:12:37 Troubleshooting Bitly in a Google Sheet Script 00:07:07 Unique Features - Design a Better Dashboard Part 2 00:04:13 How To Set Up Stripe Webhook to Google Sheets with Google Script 00:22:10 How to Edit a Macro 00:08:22 Sheet Stories / Video Notes + Clear 24 Hour Old Videos 00:35:10 Add A Timestamp to Task Lists (without Now Formula) 00:07:44 Make your Custom Functions Like Native Functions | Custom Function Autocomplete 00:17:58 Create a Changelog Between 2 Cells Custom Function | To learn Double For Loop 00:23:26 New Syntax for WhatChanged Formula in Google Script 00:07:14 How to Record Macros 00:06:20 5 Ways to Create Coupon Codes | Create UUIDs 2 Ways to Delete Lines Quickly (CAREFUL, it's a script!) 00:09:53 Deep Inside Dark Habits Google Script 00:18:54 How to Trigger Macros Daily 00:06:58 Create a Radio Button From Checkboxes Using Google Apps Script 00:15:01