totalizer formula

  • Thread starter Thread starter KARIM
  • Start date Start date
K

KARIM

I need a totalizer formula?

example : A number is put daily in A1, then auto transfered to A2
Next day a new number entred in A1 will be
accumulated
in A2.( A2 is considred as accumulator or
integrator)

thanx for help.;)
 
Thanks Nick

"Accumulating" has its place, but not very often and is fraught with peril
when a mistake is made.

I answered one poster with this method and he seemed pleased.

You could use a worksheet_change event macro to enter the contents of the
input cell into column B at the next available empty row.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo stoppit
Application.EnableEvents = False
If Intersect(Target, Me.Range("A1")) Is Nothing Then Exit Sub
With Target
If .Value <> "" Then
ActiveSheet.Cells(Rows.Count, "B").End(xlUp) _
.Offset(1, 0).Value = Target.Value
End If
End With
stoppit:
Application.EnableEvents = True
End Sub

Right-click on your sheet tab and select "View Code". Copy the above code
into the module that opens.

I would enter in B1 =Sum(B2:B500). Whatever you think you need
to gather all future values in Column B.

Using A1 as the input cell, any new number entered will be automatically
placed into Column B(starting at B2)at the next available empty row.

Now you have a "paper trail" and a Totalizer cell(B1)

Note: if a mistake is made in last entered number in A1 , you will have to
delete the contents of the last cell in Column B then re-enter in A1.


Gord
 
Back
Top