How to Highlight Edited Cells

Learn how to highlight edited cells in Google Sheets using Apps Script, allowing you to visually track changes with a simple function.

In this video, I'm going to show you how to highlight edited cells . This doesn't mean just changing from blank to something, it means like if we change text 33 to 44 here, this edited cell will highlight orange. I'm going to show you how to do that in this video. First, we're going to go up to extensions app script . This is not done with conditional formatting because we need something specific, which is we need to know when something is edited, and what we're going to do in Apps Script is we're going to name this function onEdit. We're going to use an event, or just the letter E here as a variable, and what that is is an event variable that includes a lot of data about what is being edited, the row, the column it's on, if it's just a cell, or if it's more than that. So we can get the row this way by doing variable row equals e. range . getRow. Variable column can be e. range . Highlight Row as You Move Your Cell Selection How To Create a Stop Watch in Google Sheets Highlight Row as You Move Your Cell Selection How to Protect Spreadsheet From Yourself

getColumn. And now that we know the row and the column of where it's being edited, we can say spreadsheetApp . getActiveSheet. get range , and we can set that range . We can say, hey, let's do one more edit to that range . Set background. And here we can name any color we want or have any hex code we want. I'm going to write orange. We're going to save this and then back on our sheet. Anytime we edit a cell or edit the value in a cell Like here, we'll name this Dwight, and we'll put in 44 sales. Any edit, or even edit from blank to non blank, is going to change the background to orange. Highlight Row as You Move Your Cell Selection No More Google Sheet Tricks Brighten Up Your Checklist Automatically How to Change the Color of a Cell