79% OFF online library of tutorials for mastering Google Sheets
New Syntax for WhatChanged Formula in Google Script
About this Tutorial
If you are not a better Sheets member yet, consider uh, signing up better sheets.co. You can get it as, as of right now, you can get it as low as $19 lifetime value, uh, deal through AppSumo. But that will be changing at some point in the future. Um, might be a. different price or a monthly price. Um, but if you're watching this on YouTube, uh, you will be able to see the code that Dylan wrote, and you can copy that if you wish.
So, um, but all better Sheets members in the description is linked to this sheet. You get the sheet, you get the code. , you get everything that you want out of this. So what I did in the prior video is I created this custom function called What Change. And it looked at two sentences or two cells and said, what are the, uh, words that are added and what are the words that are deleted?
This is really useful for, uh, copywriters, copy editors. Anyone who wants to say, uh, either show their work or if you want to see other people's work. Say you're a manager or you're trying to learn like. What, what changed, and you really like want to just execute the changes and then catalog those changes in another cell.
Um, this is, this is a really cool way to do it. You could rewrite tweets. You could, um, if you're an SEO agency, you could say, here's like, here's a list of seo. Keywords. Here's all the changes we would make to that. Um, you could, if you're a copywriter, copy editor working for someone else, you could say, here's all the changes I made, and here's literally the changes.
And then he wrote this. He said, let what changed equals first and second. And he used this set, which is like an iterator, and I'm just learning it now, but it works . Like what happened is, first I was like, I don't think this. Functionality or it says format or syntax works in Google Scripts. That's my first thought.
This looks like pure Java script. It even has these back ticks where it combines a lot of stuff that I had differently. Um, here I'll show you here. Uh, this is what I originally had here where I created these arrays. I created empty arrays and then, uh, just looked through, through a couple of the edge cases first.
Um, I go through this much more in the other video, and then I went through a double four loop and then said like, okay, compare each item to every item in the other one. Does it include it? And if it doesn. then say, Hey, this is deleted, or this is added. And here I even have this, uh, all text equals added and deleted.
And, and I was like, well, does this set, cuz this set doesn't look like it works. It doesn't, it doesn't look and feel like the same. Way that, like Google Script works like this. Uh, the, they turn purple, these, these ifs, and the let, and this the variable turns to blue. And then here in these back ticks, this added does turn to blue.
This deleted does turn to blue, but I had no idea what these three dots do. And I was like, I don't think this is gonna work. But I did write it all out and I just tried it and it works. So check this out. So I'm just gonna try the new function. and obviously like the, the test is, it doesn't re result in the same thing and it does the change.
The first thing we want to check is b2. Second thing is b3 let it load loading. And there it is. That is the same. And now if we drag it down,
we see nothing changed down here. That is correct. And then, , all of these are the same. And that's really, really interesting to me. Thank you Dylan, so much. Um, for this, because also I cha I check this, let, which normally when I'm writing Google Scripts, I write them with this function and then the name of the function and then what are the, uh, the things that are gonna be inside of it.
What are the variables I wanna grab and then this function. But what we did here, what Dylan. , and again, it doesn't look like it works because nothing changed. Like the ide, the, the, the, the coding like environment here doesn't change this, these first and second to blue. So I wouldn't know if this worked, but I just tried it.
What the change. And we're gonna do b2, b3, same, same implementation. And we're gonna see what happens. I'm gonna just make this a little bit bigger there. and we get the exact same result, right? And ideally we're gonna get the same result here. Um, then even we're gonna get, if it's blank down here, we're going to get another there.
Um, I learned something new every. And I hope you learn something new too. Uh, feel free to ask questions and reply in this, uh, the video here, or, um, this video will be on YouTube. If you are watching on YouTube, subscribe. And we're gonna learn something new about Google Sheets all the time. I was gonna say every day, but I'm not literally posting every day.
So, um, but if you do want access every single day to Better Sheets videos, and there's like 145 videos available to members right now, go check out better sheets.com. Bye.
Sheet Stories / Video Notes + ADDED: Email Notifications
Add Click Tracking To Your Google Sheets | Bitly in a Google Sheet
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 2
ChatGPT Clone in Google Sheets Part 1
Quickstart Tutorial OpenAI API in Google Sheets
Embed a Number in a Website from a Google Sheet
Create Navigation Like A Book or Presentation
Bjarne Asks: Can I show the Last Time of the Last Edit in a sheet?
Embed a Headline in a Website from Google Sheets
Capture Emails from Website Form to a Google Sheet (Without Zapier)
Hold a Giveaway Raffle in a Google Sheet
Create a new Spreadsheet from just a Name in a Sheet.
Email Yourself a Cell from a Google Sheet, Every Day
OpenSea Data Inside Sheets
Shwitter | Twitter in a Google Sheet
Create an Email Campaign Stats Calculator
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
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
What Can You Automate in Google Sheets? Every single trigger available to Google Sheet users
Google Sheets Stories? No! But we'll add timestamped video notes to your google sheets.
Sync Two Tabs Without ImportRange()
Password Protecting Data In a Google Sheet Part 2 The Basics
Benoit Asks: How to Convert Case
Learn to Code in Google Sheets, For Programmers
Add a Checkbox to Turn on Dark Mode
Write Your First Script
Find Keywords in Any Column, And create a quick search dropdown to find them.
Basic CRM - Add a Powerful Script To Move Row Based on Status
How To Improve: 1,000 Business ideas: Business Idea Generator
Let's Make a Bookmarklet!
Troubleshooting Bitly in a Google Sheet Script
Unique Features - Design a Better Dashboard Part 2
How To Set Up Stripe Webhook to Google Sheets with Google Script
How to Edit a Macro
Sheet Stories / Video Notes + Clear 24 Hour Old Videos
Add A Timestamp to Task Lists (without Now Formula)
Make your Custom Functions Like Native Functions | Custom Function Autocomplete
Create a Changelog Between 2 Cells Custom Function | To learn Double For Loop
New Syntax for WhatChanged Formula in Google Script
How to Record Macros
2 Ways to Delete Lines Quickly (CAREFUL, it's a script!)
Deep Inside Dark Habits Google Script
How to Trigger Macros Daily
5 Ways to Create Coupon Codes | Create UUIDs
Create a Radio Button From Checkboxes Using Google Script