Inventory Button in Google Sheets

Learn how to create inventory buttons in Google Sheets using App Script to easily increase or decrease inventory counts with just a click. This tutorial simplifies inventory management by automating the process, ensuring accurate tracking of stock levels.

We have a little bit of an inventory template here, and we wanna add buttons up at the top to increase our inventory. Maybe we get new shipment or decrease our inventory when we sell an item. Now the issue is because here we have Bluetooth mouth and keyboard available for sale, and we have an inventory. Maybe we also have a price. But our inventory will wanna move up and down by one. What we have to do is go to our cell, take that four, and increase it by one to five. Doing this by hand or manually causes. A lot of problems. We need to know the simple math. We need to make sure that the person putting it in knows what the existing number is, that they do it correctly. If we do four, for instance, this is not a good number to have in our cell. Simple Inventory Management Automations Auto Increment Invoice Numbers So The Sheet Remembers!

It's just text. So we want them to always have a number . We can do a bunch of data validation . To say, Hey, this must be a number . But then we still don't know if that's the correct number and if they do the math wrong, uh, then our inventory accounting system is going to be completely messed up. So let's make it really simple to add one to this B five here with Bluetooth. And we're gonna do that with a little bit of app script and a little bit of drawing . Yes, insert a drawing . Let's choose a shape. Click this. Add Text plus one Save and Close, and we have this button we can press. It's an image we need to assign a script. So let's go up to Extensions app script. We will start creating a function called function blue tooth plus one. Iterate Numbers with a Simple Apps Script Getting Started Coding in Apps Script Add a Button To Automate Add a Row with Priority Status

We will create a variable range . That's spreadsheet app. Do get active spreadsheet , get sheet by name. We could call this, let's say inventory. I get range . And our range for Bluetooth is going to be B five, B five, variable value equals range . Get value. And then we're going to take the range set value to value plus one. Let's save this, and we're called this Bluetooth plus one. We're going to copy that name now. Right now it's five. Let's double check that it works correctly. We'll click run and authorize. And we can see here it's six, so it works. Let's click on our image . Click the three dots in the upper right corner, assigned script and paste the name of the script. Iterate Numbers with a Simple Apps Script Spreadsheets Explained over 5 Levels of Difficulty Get Values from Sheet for Custom Function in Apps Script

Click okay. Now, every time we click Bluetooth plus one, it increases B five by one. Let's say we wanna create one that decreases it. Let's go to insert image drawing . Let's create another shape, a little bit small. Let's make it orange and say Bluetooth, minus one. Save and close. Click and drag it up here. And now go back to our function . We're going to copy and paste this function inside here, and instead of plus one, it'll be minus one. And instead of value plus one, we do minus one. Save. So we have Bluetooth minus one click in the upper right corner of the drawing , assigned script paste, Bluetooth minus one, and now we can go up and down depending on which button we click, and we can make that for 2 New Ways To Add Emoji Reactions Add a Button To Automate Add a Row with Priority Status

the mouse and keyboard as well. All we have to do is go back to our functions , copy them, and change the range here. So we could create keyboard function , keyboard plus one, and that's B six actually. Sorry, that's B seven. If we want keyboard minus one. Again, copy and paste. Just rename it. To minus one and change the value, plus one to minus one save. And now we have two more functions that we can add that to here with any drawings as well. Enjoy. 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. Spreadsheet Automation 101: Functions Spreadsheets Explained! 5 Levels of Difficulty: From Basic Text Input to Google Apps Script How to Retype Header Automatically

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. Ask Questions Google Sheets Interface Changes Download Google Sheets