Increase or decrease a value in a spreadsheet cell using a keyboard shortcut instead of manually entering it?

Home » Software » Increase or decrease a value in a spreadsheet cell using a keyboard shortcut instead of manually entering it?
Software No Comments

Other answer:

Duggywuggy:
It seems that you wish to increase or decrease the existing value in a cell, not copy and paste another value into the cell. You don't state whether you wish to increment/decrement the cell value by '1', '5', or some other number. Or, whether you wish to display an input box to enter a new value in the cell by pressing a keyboard shortcut.

EDIT:

Here is one way to do as you wish using two macros, attached to keyboard shortcuts 'i' and 'd'

Copy these two macros to the clipboard (highlight all code, right click inside the highlighted area, and 'Copy'):

Sub vInc()
vAdd = InputBox("Enter 'add' amount", "Add?")
ActiveCell.Value = ActiveCell + vAdd
End Sub
Sub vDec()
vSubt = InputBox("Enter 'subtract' amount", "Subtract?")
ActiveCell.Value = ActiveCell – vSubt
End Sub

With your workbook open, press ALT + F11 (Function Key F11)

In the menus at the top of the VBE, select 'INSERT > MODULE'

When the module is created, paste both macros into the white editing area to the right (right click inside the area and 'Paste').

Close the VBE (red button – top right).

Press ALT + F8 (Function Key F8)

When the Macros window opens, highlight the vInc macro and click 'Options…'.

When the Options window opens, enter the letter 'i' in the Shortcut Key textbox and click 'OK'.

Select the vDec macro and click 'Options…'.

When the Options window opens, enter the letter 'd' in the Shortcut Key textbox and click 'OK'.

Close the Macro window.

Select any cell. To increase the value press Ctrl + i. Enter the amount to add and click 'OK', or press ENTER.

To decrease the value of the active cell, press Ctrl + d. Enter the amount to subtact and click 'OK', or press ENTER.

Marvinator:
This could be done with a drop down, but you'd need to have the drop down defined to include which numbers you require. As an example, the number 2-10 as multipliers for orders of products. Tab to the cell, and hit the down arrow to drop down the list, and again, the down arrow (or up arrow) to select the proper number.

Did a little more work (and tested it in Excel 2010) and this could also be done with a macro, and then assign the macro to a keystroke combination.

Alen:
I am not quite sure what exactly you are reff too.. hope this link helps.

https://support.office.com/en-us/article…

Ryan:
You are a big nerd

LEAVE A COMMENT