Pauline,
There are ways to do this, sort of. But consider this: When you key in
values, there's no record of which of your values have been swallowed up by
the cell, and which haven't yet been entered.
You can lose track. So for many options, it's not a good solution. Better
to list the values in a column and total them with a formula.
But if you insist:
Tools - Options - Calculation. Check "Iteration" and set maximum iterations
to 1. For this example, the value will be entered into B2. So B2 will
always indicate the most recent entry. C2 will keep the running total, in
C2: =B2+C2. Now to clear what's in C2, enter it's value negatively into
B2.
Or if you insist on entering the new values directly into the summing cell,
use this event macro in the sheet module:
Private Sub Worksheet_Change(ByVal Target As Range)
Static Counter
If Not Intersect(Target, Range("B2")) Is Nothing Then
Counter = Counter + Target
Application.EnableEvents = False ' prevent this from retriggering itself
Target = Counter
Application.EnableEvents = True
End If
End Sub
It's barebones. For example if other routines are also messing with
EnableEvents, it'll have to be changed.
Earl Kiosterud
Mvpearl omitthisword at verizon period net.
--------------------------------------------