add up numbers !!!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi i am having some differculties by putting some numbers in a column going
down and i have another column nex to it and i want the numbers from the
first column so that everytime i add some numbers to that column it will add
them up in he column next to it so its like a continues adding senquence if a
picture is needed email me ur email and ial email it to u thanks ryan. :)
 
Right click sheet tab>view code>insert this>adjust to your column>SAVE
workbook

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 16 Then Exit Sub
Target.Offset(, 1) = _
Application.Sum(Range("p1:p" & Target.Row))
End Sub
 
Don,

Not a big overhead but without Application.EnableEvents = False /
Application.EnableEvents = True

your code is actually firing twice.

At least it does in my XL97

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
From your workbook and minimal description, IF you want the total of col B
shown in Col D whenever you input data in col B, then

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 2 Then Exit Sub
Target.Offset(, 2) = _
Application.Sum(Range("b1:b" & Target.Row))
End Sub
 
Back
Top