Video instructions and help with filling out and completing Can Form 2220 Worksheet

Instructions and Help about Can Form 2220 Worksheet

In this video we're going to learn how we can use Google sheets to add a few buttons and all all those buttons to manipulate our screen so to start off we're going to go to sheets Google comm you'll see this will take us into the interface where we can create a new spreadsheet so I'm going to go ahead and click on this click menu here and this is going to open up my spreadsheet interface we're going to give this one a name I'm going to call this inventory sheet and now I have this inventory sheet that I can start adding to and changing so I'm going to give this a couple of column headers so I'll give it a product name I'll give it a lot size and I'll give it a count now I have some products I can fill in so you know if I wanted to say for example say soda you know soda is going to come in 24 cases of 24 cans and it will just say zero now if I want to be able to manipulate one of these values I can use my script editor to do that in conjunction with some drawings so that I can make it look like their buttons so the first thing I want to do is open up my script editor go ahead and click tools script editor and that's going to pop up my script editor here now I'll be able to create a new some new code so I'm just going to go ahead and clear this off the start I'm going to save this will say code for the inventory sheet give that a name we'll save that you know we can save it just by hitting this button or hitting command S if you're on a Mac or ctrl s if you're on Windows now that we have that we can actually create a few a few different functions here so I'm going to create a function that I'm going to use for a couple of couple of my rows here I'm going to call this function modify cell I'm going to give this two parameters the first parameter is going to be the cell name and then the second parameter is going to be whether or not this is increasing and in this function what I'm going to do is access a cell so go ahead and get the range first save our range is equal to spreadsheet app and then we'll get this nice autocomplete dialogue that's nice we'll get the active sheet and then we're going to get the range based on this cell name once we have this we can actually very easily change but we need to know whether or not we want to increase it by one or decrease it by one so we're going to create a second variable here and that second variable is going to be called to add and we'll go ahead and call that negative one and if we want to increase will call to add one what we're going to do here is if we need to increase we'll add 1 to the value we've retrieved and if we don't we'll add negative 1 which will be the same as subtracting 1 from that value so now on the next line I will say range dot set value and here we will actually give it range get value plus to add so now when we call this function with the particular cell name and whether or not this should increase this will either add one or subtract one from the cell we said so I'm going to say funky add a new function here we'll call this function increase line two and now we're just going to call that modify cell modify cell cell name is going to be well it's going to be the row two and we're looking at the cell C if we go back to our spreadsheet you can see here this is the one we're going to want to modify so C 2 so here we're going to give this C 2 and then we're going to pass in true because we want to increase also create a function called increase line I'm sorry decrease line two and we'll call modify cell again with C 2 this time we'll call it with false now if we save this we'll be able to go back to our sheet and create some buttons so we're going to go ahead and create a drawing we'll go to insert drawing and we have a few different shapes here that look like buttons we can really select any of these but go ahead and pick this one because I think it looks kind of like a button we'll click that you know we get this nice big blue and we can edit the text on that and give it a plus we'll go ahead and put that in the center we use here we'll go to more and we will select Center we go we can make that bold to if we wanted and then just make it quite a bit smaller maybe a little bit bigger than this there we go all right I'm going to save and close that you'll see here we get this drawing so I'm going to go ahead and move that over to here and go ahead and close the resulting dialog now if I click on this you'll see this nice little pull down arrow if I click on that pull down arrow I can assign a script and we'll we called our function over here in crease line two we're just going to type in here in crease line two and now when I click this button it's going to ask for authorization first I continue we'll say okay we can we can modify the spreadsheet with

100%
Loading, please wait...