#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 347
Default cumulative total

Can anybody help!...Iv got two worksheets, one sheet"MAIN" I enter values in
column A,B and C. The second Sheet"Sheet2", I have as a summary sheet,
keeping totals of columns A,B and C of sheet"MAIN".
What I would like to do is to be able to clear the values in sheet"MAIN"
daily without affecting the values in the summary sheet. In other words, the
totals keep adding in the summary sheet as values are inserted and cleared in
sheet"MAIN".

--
George
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 510
Default cumulative total

Hi George,

To be adapted to your needs :

Private Sub Worksheet_Change(ByVal Target As Range)
Dim OldVal As Variant, NewVal As Variant
If Target.Count 1 Then Exit Sub
Application.EnableEvents = False
NewVal = Target.Value
Application.Undo
OldVal = Target.Value
If IsNumeric(OldVal) And IsNumeric(NewVal) Then
Target.Offset(0, 1).Value = NewVal + Target.Offset(0, 1).Value
End If
Target.Value = NewVal
Application.EnableEvents = True
End Sub


HTH
Cheers
Carim

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default cumulative total

George

Have you thought about what you will do if a mistake in data entry is made?

How will you delete and correct?

Where is the "paper trail" to follow?

What you want can be done in one of several ways(see Carim's post for one
method). but there is no way to check after errors are made.


Gord Dibben MS Excel MVP


On Sun, 22 Oct 2006 07:19:01 -0700, George
wrote:

Can anybody help!...Iv got two worksheets, one sheet"MAIN" I enter values in
column A,B and C. The second Sheet"Sheet2", I have as a summary sheet,
keeping totals of columns A,B and C of sheet"MAIN".
What I would like to do is to be able to clear the values in sheet"MAIN"
daily without affecting the values in the summary sheet. In other words, the
totals keep adding in the summary sheet as values are inserted and cleared in
sheet"MAIN".


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 347
Default cumulative total

Thanks for the reply. It works fine.
Thank you.
--
George


"Carim" wrote:

Hi George,

To be adapted to your needs :

Private Sub Worksheet_Change(ByVal Target As Range)
Dim OldVal As Variant, NewVal As Variant
If Target.Count 1 Then Exit Sub
Application.EnableEvents = False
NewVal = Target.Value
Application.Undo
OldVal = Target.Value
If IsNumeric(OldVal) And IsNumeric(NewVal) Then
Target.Offset(0, 1).Value = NewVal + Target.Offset(0, 1).Value
End If
Target.Value = NewVal
Application.EnableEvents = True
End Sub


HTH
Cheers
Carim


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 347
Default cumulative total

No, I haven`t thought of that.....Have you got a suggestion?
--
George


"Gord Dibben" wrote:

George

Have you thought about what you will do if a mistake in data entry is made?

How will you delete and correct?

Where is the "paper trail" to follow?

What you want can be done in one of several ways(see Carim's post for one
method). but there is no way to check after errors are made.


Gord Dibben MS Excel MVP


On Sun, 22 Oct 2006 07:19:01 -0700, George
wrote:

Can anybody help!...Iv got two worksheets, one sheet"MAIN" I enter values in
column A,B and C. The second Sheet"Sheet2", I have as a summary sheet,
keeping totals of columns A,B and C of sheet"MAIN".
What I would like to do is to be able to clear the values in sheet"MAIN"
daily without affecting the values in the summary sheet. In other words, the
totals keep adding in the summary sheet as values are inserted and cleared in
sheet"MAIN".



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
Pivot Table Sub total and totals Karen53 Excel Worksheet Functions 4 July 23rd 06 07:04 PM
Need help with grand totals in pivot table Missygal Excel Discussion (Misc queries) 1 May 16th 06 07:02 PM
Percent of total in Pivot tables Pallet1210A Excel Worksheet Functions 1 September 8th 05 07:12 PM
CUMULATIVE TOTAL Norm Excel Worksheet Functions 1 February 3rd 05 03:30 PM
cumulative total using two cells Bill Excel Worksheet Functions 1 January 30th 05 04:08 AM


All times are GMT +1. The time now is 02:54 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"