Is it possible to create macro buttons to navigate in Google Sheets?

Let’s create a button to go to the left hand most page. Please select one of the right hand pages or push the + sign in the lower left to create one.

Here’s the script:

function gotoMostLeftPage() {
  var ss=SpreadsheetApp.getActive();
  ss.setActiveSheet(ss.getSheets()[0]);
}

Now we need a button:

enter image description here

We can use insert/Drawing to draw an image of our drawing.

enter image description here

In this case I’m using a basic shape. You can add text if you like.

enter image description here

Now just save and close.

enter image description here

Drag the button to where you want it and click on the three buttons in the upper right.
Select Assign script.

enter image description here

Copy the script name.

enter image description here

Paste it into the dialog and click ok.

Try clicking on the button and it should take you to the left most page unless you are already there.

Leave a Comment