View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
todd todd is offline
external usenet poster
 
Posts: 6
Default yes that's it

The issue is my working column or target column will not
always be in A sometimes B or C

thanks will use this
-----Original Message-----
This line checks for column A:
If Target.Column = 1 Then

If Target.Column = 2 Then
would check for B.

Do you mean that you want it to work on either A, B or C?
If target.column < 4 then

todd wrote:

Thanks I could not wait and plugged it in.

If need be I can work with it in column A but I am
wondering if there is a poiojnt in the coode where I can
modify it to work in say for example column B or Column

C.

TOdd Frisch

Anyway this is very cool - I appreciate your time.
-----Original Message-----
Private Sub Worksheet_Change(ByVal Target As

Excel.Range)
Dim sForm as String, sVal as String
On Error GoTo ErrHandler
If Target.Count 1 Then Exit Sub
If Target.Column = 1 Then
sVal = Target.Value
If sVal = "" Then Exit Sub
Application.EnableEvents = False
Application.Undo
sForm = Target.Formula
If Left(sForm, 1) < "=" Then _
sForm = "=" & sForm
sForm = sForm & "+" & sVal
Target.Formula = sForm
End If
ErrHandler:
Application.EnableEvents = True
End Sub

Right click on the sheet tab and paste in the code.

Now start typing numbers into column A.

Just overtype any existing number and it will build

your
formula.

--
regards,
Tom Ogilvy

todd wrote in message
...
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




.


--

Dave Peterson

.