Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google sheets jump to cell

I only complete entries in e.g. columns A to R, I would then like to automatically jump back to the next free cell in column A. This is in a shared sheet. Can anyone tell me how to do this as a complete novice?

Also when I first open the sheet I would also like it to go to the first free cell in column A.

I have tried looking through many answers and can see several questions asking the same but can't seem to get anything that actually does what I want.

I would need detailed instructions.

Thanks for any help anyone can give.

like image 904
J A Avatar asked Nov 12 '16 21:11

J A


3 Answers

You should write custom js code in script editor.

function onOpen() {
  var spreadsheet = SpreadsheetApp.getActive();
  var menuItems = [
    {name: 'Go To End', functionName: 'goToEnd'}
  ];
  spreadsheet.addMenu('My Menu', menuItems);
}
function goToEnd() {
  var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();  
  var lastRow = sheet.getLastRow();
  var lastColumn = sheet.getLastColumn();
  var lastCell = sheet.getRange(lastRow, lastColumn);
  //Browser.msgBox('values: ' + lastRow + '-' + lastColumn);
  sheet.setCurrentCell(lastCell);
}

For more Google App Scripts

like image 127
kaya Avatar answered Oct 19 '22 18:10

kaya


There's a great video here that shows how you can do this.

If you're not into watching the video:

  • Open this Gist here.
  • Open Google Sheets.
  • Go to Tools -> Script Editor.
  • Enter the script (replace the text that appears there), and save it as something like goToCell.
  • Refresh Google Sheets. A menu appears, goToCell.
  • Open it, and follow prompts to authorise it.

Now you have a goToCell menu option.

like image 23
Alex Harvey Avatar answered Oct 19 '22 18:10

Alex Harvey


Have you tried using shortcut keys, specifically Ctrl + Left ? Ctrl + Left selects the next empty cell to the left or the final cell in the row.

  1. Once the user has filled in columns A - R, pressing Ctrl + Left will take them to column A.
  2. Then pressing Ctrl + Down will take them to the first row with an empty A cell.

Sometimes a simpler solution is best. This answer is ported from Doc Editor Help.

like image 32
MXMLLN Avatar answered Oct 19 '22 20:10

MXMLLN