View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
[email protected] pfsardella@yahoo.com.nospam is offline
external usenet poster
 
Posts: 172
Default macro to expdite editing cell

Watch for linewrap.

Sub CreateFormula()
Dim dblNum As Double, dblAdd As Double

dblNum = ActiveCell.Value
dblAdd = Application.InputBox("Please enter the number to add.",
Type:=2)
ActiveCell.Formula = "= " & dblNum & "+" & dblAdd & ""

End Sub


Tested using Excel 97SR2 on Windows 98SE,

HTH
Paul
--------------------------------------------------------------------------------------------------------------
Be advised to back up your WorkBook before attempting to make changes.
--------------------------------------------------------------------------------------------------------------
I posted this once but not shwoing up after atleast an hour

I have a number in a cell I need to edit the cell by going
in and adding an = sign in front of the original number,
placing a plus just after the original number , then
entering a new number

so original cell might look like 5.734

then need to add 4.375

I need to keep both numbers so need to do calc but want to
cut down on key strokes

when done needs to read =5.734+4.375 ( a simple calc
giving me the sum of the 2 numbers in the cell

The goal is tohave a short cut key to add an = sign to the
left of a single number then jump to the right of it, add
a plus sign, and give me a blinking cursor to type in my
number I want to add to the back of it.

Thanks much

Todd