How can I add buttons to my spreadsheet in Google Sheets?

preview_player
Показать описание
This video describes how you can use Apps Script (JavaScript) to add buttons and run code in Google Sheets.

Рекомендации по теме
Комментарии
Автор

Finally, assign a function to a button. Something I missed from Excel VBA. There may be more examples here but this is the first one I stumbled across. Thanks

jerrystevens
Автор

Exactly what I needed. Thanks for making this video.

brintmontgomery
Автор

Thank you for this! So straight forward and clearly explained. Made it very easy.

paigepearson
Автор

This works perfectly, just replace the work "Home" with the name of the sheet you need.


function showSheetByName(Name) {
var ss =
var sheet = ss.getSheetByName(Name);

}

function Home() {
showSheetByName("Home");
}

danielshires
Автор

Like others have said, it's exactly the guidance I was looking for. Thank you for the demo.

sunnisukumar
Автор

Great tutorial. Simple and to the point. Thanks.

Professorkek
Автор

Thanks a lot. This guide really helped me. <3

saintfall
Автор

Perfect quick tutorial. It helped me do what I was looking to accomplish! Thanks!

andrewcamero
Автор

Great video! I would suggest inserting an outside image instead of drawing one, since the icon from drawing will create the edit box to pop up if you double click the button.

eugenesheely
Автор

function modifyCell(cellName, increase) {
var range =
var toAdd = -1;
if (increase) {
toAdd = 1;
}
+ toAdd);
}

function increaseLine2() {
modifyCell ("C2", true) ;
}

function decreaseLine2() {
modifyCell("C2", false) ;

theo
Автор

Thanks for the vid. What I was hoping to find was a way of addin into a cell itself a thing I remember long ago, where each header of a cell had a sort button, like you may see in a website sheet, allowing you to sort each column without having to click through the stuff to get to the sort window.

WereWade
Автор

It is much appreciated for doing this video.

snadaiconsultant
Автор

This is great! Only problem is it's not practical if you have a lot of line items (1000+). Any suggestion for a fast way to create a lot of buttons? Could you put the button image in an a cell adjacent to the numner (as opposed to leaving it floating) then in script editor use an offset so that the cell the button effects is in a relative position to the button location as opposed to a defined cell?

SL-zejb
Автор

I like the way you presented, thank you and I learned a lot :)

xgalaxyone
Автор

Hi Timothy I have worked it out. Started a new sheet from scratch

bjjforthepeople
Автор

Very helpful video btw <3 thank you!

andreaburtondesign
Автор

Also wondering - is it possible to create an option where you can create new data each day on the same spreadsheet, without having to make a copy and start over? Or without having to create the code for each new cell? (if that makes sense)

jenniferrahn
Автор

Hi Tim. Can you make a video or tell me how I can put a one click check box in multiple cells. I want to be able to check or uncheck a cell with one click or one tab on the tablet. Thanks.

richardhuynh
Автор

Thank you.. please continue making videos

ponnarasukrish
Автор

how could it be 2022 and we still have to draw buttons on google sheets like this. This is prehistoric.

RandallNewman