Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default One cell accumulation

How do i calculate in one cell without creating a circular reference?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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?



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel auto accumulation formulas Arix Excel Worksheet Functions 1 May 11th 10 07:41 AM
Interval accumulation and resets Tom Excel Discussion (Misc queries) 1 December 17th 07 05:47 PM
Sick time accumulation Clueless Excel Worksheet Functions 3 January 9th 07 07:18 AM
How to do one cell accumulation VR Excel Worksheet Functions 3 September 28th 06 08:05 PM
Accumulation Paul Excel Worksheet Functions 1 April 22nd 05 11:32 PM


All times are GMT +1. The time now is 01:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"