Automate Upper Case
Learn how to automate upper casing in Google Sheets using Google Apps Script, allowing text in one column to automatically appear in uppercase in another column.
you wanna automate your upper casing. So here we have some text in column A and we want the output in column B to be upper casing. If you just wanna uppercase it with a formula , you would do upper A two. And you can do that the entire column here. But what if we wanted just to automate it? If we typed in the A column, some text in the B column that is automatically upper cased or when we type it in the A column? In the A column, it's uppercase. I'll show you how to do that. Go up to extensions app script . So here, let's take our function , call it on edit. Put an E here for event that is a little variable that's gonna have some really cool information on it. We will know what row we're on by going E range , get row, and we can say, if we're on the page called data , then we want to add in
column B, the uppercase version of A. So if actually we need the. Sheet we're on spreadsheet . Spreadsheet , app, get active sheet , get name if in parentheses sheet. Two equal signs data . Then these curly brackets we're gonna go spreadsheet app, get active spreadsheet . Get sheet by name, that data will be there. And for name get range , our range is gonna be the row we're on. That is our variable up here. Which column are we in? We're in the second column set value. And what is the value? We wanna set? Uppercase value. Where do we get that from? We go variable. Uppercase value is equal to. And we take all of this, paste it here, that's the data row get range.
We're on that row. We want the first column and not set value, but get value. We're gonna get the value that's in the row that we're on. We're the first column, save everything. And let's just type in here one more row. And what do we have here? We have the text, but we haven't uppercase it. We have to add two uppercase. Now, let's try here. One last row. There it is. In our B column, it is capitalized. So if we want the A column to be uppercase, then all we have to do is go to this row nine and instead of the two column, we'll put in the one column and now one final uppercase row, I'll hit enter.
And it'll uppercase it automatically. Isn't that cool? Isn't that amazing? I love automating. If you're interested in more, check out spreadsheet Automation 1 0 1 over on Better Sheets or on Udemy Checkout Master Spreadsheet automation. I'll put the link in the description below. You are watching better sheets here on YouTube. Make sure you check out this video or this video and subscribe right now to get more tips, tricks, how tos, get more out of your Google sheets than you ever have before. I'm excited to be making a ton more videos here. Ask me questions down in the comments and I will answer them in future videos. But for right now, right here, one of these videos is gonna be your next Google sheet.