Skip to content

Instantly share code, notes, and snippets.

@rubenrivera rubenrivera/GoTo.gs
Created May 2, 2018

Embed
What would you like to do?
Go To Macro. Shows a prompt on which the user set the address of cell to quickly jump into.
// Related Q&A https://webapps.stackexchange.com/q/116736/88163
function GoTo() {
var spreadsheet = SpreadsheetApp.getActive();
var Ui = SpreadsheetApp.getUi();
var buttons = Ui.ButtonSet.OK_CANCEL;
var response = Ui.prompt('Go to', 'Where do you want to go?', buttons);
if(response.getSelectedButton() === Ui.Button.OK){
var address = response.getResponseText();
spreadsheet.getRange(address).activateAsCurrentCell();
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.