Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Update totals
I have a sheet which contains data about certain parts of our office. The
data is in range B2:F32. The data is numeric. What I would like to do, if possible, is the following: B2 contains 94, the user wants to add 37 to it by typing 37 over the 94, hit return and the new total of 131 should appear. Many thanks in advance. Cheryl |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Update totals
Right click on the sheet tab and select view code. Put is code similar to
this: Private Sub Worksheet_Change(ByVal Target As Excel.Range) On Error GoTo ErrHandler If Target.Count = 1 Then If Not Intersect(Target, Range("B2:F32")) Is Nothing Then If IsNumeric(Target) Then dblVal = Target.Value Application.EnableEvents = False Application.Undo Target.Value = Target.Value + dblVal End If End If End If ErrHandler: Application.EnableEvents = True End Sub they would need to enter a negative number to correct mistakes. -- Regards, Tom Ogilvy Gareth wrote in message ... I have a sheet which contains data about certain parts of our office. The data is in range B2:F32. The data is numeric. What I would like to do, if possible, is the following: B2 contains 94, the user wants to add 37 to it by typing 37 over the 94, hit return and the new total of 131 should appear. Many thanks in advance. Cheryl |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pivot Totals: Group totals different from Grand totals | Excel Discussion (Misc queries) | |||
HOW DO I GET COLUMN TOTALS TO AUTO UPDATE? | New Users to Excel | |||
update Totals using current date | Excel Discussion (Misc queries) | |||
How to make autosum update totals in excel | Excel Worksheet Functions | |||
My formula doesn't update totals when I change numbers. | Excel Discussion (Misc queries) |