Thread: running totals
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Sandy Mann
 
Posts: n/a
Default running totals

MauraLae,

Try adding code to give you:

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address = "$B$5" Then
Endrow = Cells(Rows.Count, 1).End(xlUp).Row + 1
Application.EnableEvents = False
Cells(Endrow, 1).Value = Target.Value
Range("E5").Value = Range("E5").Value + Target.Value
Application.EnableEvents = True
End If

End Sub


--
HTH

Sandy
In Perth, the ancient capital of Scotland


with @tiscali.co.uk


wrote in message
ups.com...
I have this VBA macro, that I think Dave Peterson wrote.....

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address = "$B$5" Then
Application.EnableEvents = False
Range("E5").Value = Range("E5").Value + Target.Value
Application.EnableEvents = True
End If

End Sub

If I enter a number in B5 then the running total is in E5

I would like to adapt the Sub so that each number entered in B5 is
listed, starting in A1(or other column), like the tape on an adding
machine is visable.

Any suggestions?