Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
One cell accumulation
How do i calculate in one cell without creating a circular reference?
|
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
One cell accumulation
=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? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
One cell accumulation
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? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
One cell accumulation
Add this code to the sheet (right click the sheet tab and paste this code)
Private Sub Worksheet_Change(ByVal Target As Range) Static dblLastValue As Double If Target.Address = "$G$3" Then Application.EnableEvents = False Target.Value = dblLastValue + Target.Value dblLastValue = Target.Value Application.EnableEvents = True End If End Sub -- HTH... Jim Thomlinson "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? |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
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? |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
One cell accumulation
http://www.mcgimpsey.com/excel/accumulator.html
-- Kind regards, Niek Otten Microsoft MVP - Excel "Vicki" wrote in message ... | How do i calculate in one cell without creating a circular reference? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel auto accumulation formulas | Excel Worksheet Functions | |||
Interval accumulation and resets | Excel Discussion (Misc queries) | |||
Sick time accumulation | Excel Worksheet Functions | |||
How to do one cell accumulation | Excel Worksheet Functions | |||
Accumulation | Excel Worksheet Functions |