7

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.

J A
  • 79
  • 1
  • 1
  • 4

3 Answers3

7

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

kaya
  • 724
  • 10
  • 24
4

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.

Alex Harvey
  • 14,494
  • 5
  • 61
  • 97
1

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.

MXMLLN
  • 1,387
  • 2
  • 12
  • 12