Microsoft KB Archive/23608

{|
 * width="100%"|

Excel: Adding an Inputted Number to a Selected Cell

 * }

-

The information in this article applies to:


 * Microsoft Excel for the Macintosh, versions 1.x, 2.x, 3.0, 4.0

-

SUMMARY
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

MORE INFORMATION
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.