View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Alok Alok is offline
external usenet poster
 
Posts: 318
Default One cell accumulation

Though what you are trying to accomplish can probably be done in other ways,
here is the code to accumulate the values in the same cell.
Paste this code in the Sheet1's code window.

Dim dTotalInA1 As Double
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells(1).Address = "$A$1" Then
Application.EnableEvents = False
dTotalInA1 = dTotalInA1 + Target.Cells(1).Value
Target.Cells(1).Value = dTotalInA1
Application.EnableEvents = True
End If
End Sub


"Vicki" wrote:

I want to create a running total in g3. every time i enter a number in g3 it
will add to itself.


"JLGWhiz" wrote:

=2*2
Other than that, what specific type of calculation do you want to do?

"Vicki" wrote:

How do i calculate in one cell without creating a circular reference?