Excel: Adding an Inputted Number to a Selected CellID: Q23608
|
In Microsoft Excel, to add a number to an existing number and put the
result into the same cell, you must use a macro.
The following macro selects the cell in question (in this example:
B5), asks for the number to be added to the existing value, and places
the result back into the cell (B5):
A1: AddToCell
A2: =SELECT(!$B$5)
A3: =FORMULA(ACTIVE.CELL()+INPUT("Enter a number",1))
A4: =RETURN()
SELECT selects cell B5 on the active worksheet.
FORMULA places the value or formula into the active cell on the active
worksheet.
ACTIVE.CELL returns the value in the active cell (in this case, B5).
INPUT calls up an input box for you to type in the number to be added
to the original value.
For more information about these functions, see pages 193, 224, and 274 in the "Microsoft Excel Functions and Macros" version 2.2 manual. If you are using Excel version 1.50, see pages 208, 230, and 261 in the "Microsoft Excel Arrays, Functions, and Macros" manual.
Additional query words: 1.x 2.x 3.0 3.00 4.0 4.00
Keywords :
Version :
Platform :
Issue type :
Last Reviewed: March 16, 1999