Excel: Adding an Inputted Number to a Selected CellLast reviewed: November 29, 1994Article ID: Q23608 |
The information in this article applies to:
SUMMARYIn 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() MORE INFORMATIONSELECT 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.
REFERENCESFor 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.
|
KBCategory: kbusage
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |