Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 j = Cells(Cells.Rows.Count, "A").End(xlUp).Row Cells(j, 1) = Target.Value Application.EnableEvents = True End If End Sub If you had lots of entries, you should also dim j as long -- Gary''s Student " wrote: 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? |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Sorry, needs a +1:
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 j = Cells(Cells.Rows.Count, "A").End(xlUp).Row + 1 Cells(j, 1) = Target.Value Application.EnableEvents = True End If End Sub -- Gary''s Student " wrote: 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? |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Worked like a charm. Thanks much!
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Summary of Multiple Worksheet Running Sum Totals | Excel Worksheet Functions | |||
How do I do running Totals in a Pivot Table | Excel Worksheet Functions | |||
How do I add totals up from different sheets? A running total. | Excel Worksheet Functions | |||
How to hide unused cells when running accumulated totals | Excel Worksheet Functions | |||
Running Totals | New Users to Excel |