Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pivot Table Sub total and totals | Excel Worksheet Functions | |||
Need help with grand totals in pivot table | Excel Discussion (Misc queries) | |||
Percent of total in Pivot tables | Excel Worksheet Functions | |||
CUMULATIVE TOTAL | Excel Worksheet Functions | |||
cumulative total using two cells | Excel Worksheet Functions |