2

Is there a hotkey in google sheets to increment any cell +1 or -1?

I've seen many guides on click-drag patterns, creating buttons to increment a specific cell, but sometimes if you're doing inventory, it would be nice to increment rather than overwrite the value in the cell.

  • Is the cell you want to increment need to be able to be typed in? Provide a link to a google sheet with sample data, and desired output. – CodeCamper Nov 18 '19 at 15:36
  • There is a help article about Google Sheets keyboard shortcuts. Have you already reviewed? Have you considered to create a macro? – Rubén Nov 18 '19 at 16:06
2
Tools -> Macros -> Record Macros 
  1. hit save
  2. rename Untitled Macro to Add
  3. make shortcut Ctrl+Alt+Shift+1
  4. after hitting ok on the bottom left click edit script

replace add with the following function

function add() {
  var c = SpreadsheetApp.getActive().getCurrentCell();
  c.setValue(c.getValue()+1);
};

Now when you press Ctrl+Alt+Shift+1 it will add 1 to the cell. Repeat the same steps but instead subtract and minus 1, if you don't like Ctrl+Alt+Shift+1 you can use a program like autohotkey to remap a key on your keyboard to Ctrl+Alt+Shift+1 etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.