Members-only tutorial

Watch the video and get the practice sheet with membership.

See membership options

OnInstall to onOpen

About this Tutorial

We need to bridge the gap between an add-on not being installed to actually being installed. We add a simple apps script.

Video Transcript

<div>0:01 When a Google Sheet is opened, there is a moment in which you'll see, and even when a Google Sheet is created, there is a moment in which Apps Script Learn about Google Apps Script and how it enhances your Google Sheets experience. Opens in new tab is loaded.<br>0:10 And at that moment is what starts the trigger Discover triggers in Google Sheets and how they automate tasks. Opens in new tab of onOpen. And we will literally go to my Spintax one, and we'll just copy this function Understand functions in Google Sheets and how to use them effectively. Opens in new tab on open.<br>0:21 And we're just going to copy that and put it into our code here. We're still naming this code.gs.

You can rename your code if you want.<br>0:30 But we have this show alert that we're going to just, rename this alert to CPM custom, custom function Understand functions in Google Sheets and how to use them effectively. Opens in new tab by BetterSheets.<br>0:50 And we're going to write a little bit about how to use this right here. If you want to, you can see the whole thing.<br>0:58 It's just, spreadsheet Explore the features of Google Sheets and how to maximize your productivity. Opens in new tab . .getui, um,.alert, and then we have this button set, and we just need okay. This is fairly simple.<br>1:09 It just looks like a lot.

This is the custom function Understand functions in Google Sheets and how to use them effectively. Opens in new tab you can use to calculate CPM or cost per, Okay, that's all we're gonna write.<br>1:24 So whenever this sheet is opened, it will create an add-on Find out how add-ons can extend the functionality of Google Sheets. Opens in new tab menu here. When we deploy it, we're gonna see this we will see this up here new deployment.<br>1:34 We will see it in extensions right here. This is different than a menu item. That is next to the help function Understand functions in Google Sheets and how to use them effectively. Opens in new tab , or help menu Get to know the help menu in Google Sheets for quick assistance. Opens in new tab item.<br>1:45 That is what I have done previously in other videos and stuff on the unopened and creating this custom menu Learn how to create custom menus in Google Sheets for better navigation. Opens in new tab .

And that's really cool, and you can add your app scripts to use that extra menu, and you can even create I think an add-on Find out how add-ons can extend the functionality of Google Sheets. Opens in new tab that creates that menu as well.<br>2:02 But we want to make sure that actually, no, I don't think you can do a custom menu Learn how to create custom menus in Google Sheets for better navigation. Opens in new tab on the side here.<br>2:07 It has to be here, and it'll show up all along here. Help will be here. That is just we'll write that in the marketplace, I think.<br>2:19 And here's all the functions Dive into the various functions available in Google Sheets. Opens in new tab you can use. It's button styles and sheet styles both show a sidebar Understand the sidebar in Google Sheets and how it can be utilized. Opens in new tab .

So it's, this is where Explore the query where clause for advanced data manipulation in Sheets. Opens in new tab your users will use this.<br>2:29 And this onOpenSpreadsheetApp.getUI.createAddOnMenu and then addItem addToUI. We can add other items that have other functions Dive into the various functions available in Google Sheets. Opens in new tab if we want. For now, we are keeping it simple.<br>2:41 And hit save and that is adding the onOpen. Next video we'll do on install.</div>