Create Custom Menus in Google Sheets for Better Automation
Learn how to create custom menus in Google Sheets to enhance automation and streamline your workflow. This tutorial covers the steps to replace buttons with a more elegant menu interface for better user experience.
we've created this automation where we insert a new line we can categorize that line with these buttons and each one of these is this button up here but sometimes you may not want to have these buttons here you may want to create an automation menu next to this help we're going to delete these buttons here and delete these rows and edit our automations a little bit so our automations what they do is they add a row above the fifth row but now we want to do it above the second row so we're going to change this five everywhere to two and everything else we want to keep the same we want to add a row put in Services put in supplies but we want it a little bit different we want to create a menu up here next to help we can do that we can create a custom menu let's Automate Move Blank Rows Automate Row Deletion in Google Sheets with Apps Script Add a Button To Automate Add a Row with Category
go to the top and start writing function on open this on open is a builtin function that happens when the spreadsheet is opened what are we going to do here we're going to do spreadsheet app.get you we're going to do Dot create menu and we're going to call this menu new transactions we're going to add an item to this menu just so you see it I'm going to put it on a new line add item and we're going to need two arguments one where a user will see it and second the function that will run so we're going to say create service this is the function that someone will actually see the text people will see comma create service so this second argument is exactly this function name here we're Activate A Certain Sheet When Opening a Spreadsheet Getting Started Coding in Apps Script Custom Menu - 1 Function Activate A Certain Sheet When Opening a Spreadsheet
going to add another item we're actually going to copy this so we don't have to type it out each time we're going to create two I'm going to highlight that and change it to supplies do this change it to software and our functions are not changing our functions are exactly the same but how we interact with them is changing at the end add UI and now this will be really handy because what's going to happen is this will show a menu for users we going to save this close it refresh the sheet and now as we open it up again you'll see next to the help is this menu new transactions so we just had a little bit of code but it created this new transactions menu that now we can create Services we can create Simple Inventory Management Automations GPT in SHEETS Simple Inventory Management Automations Simple Inventory Management Automations
supplies category and software much more elegantly I think than those buttons there fits right in with the UI looks like it's even built into Google Sheets itself pretty cool if you're looking to get more out of your Google Sheets and you ever have before you want to make better Google Sheets subscribe here on YouTube to better sheets Google Sheets Interface Changes Google Sheets Interface Changes Google Sheets Stories? No! But we'll add timestamped video notes to your google sheets. Button Styles