Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi, let's say I entered 5 in A1 and then the next day I updated the cell to
6. Can Excel total these two entries in A1 to get a total of 11. I don't want to use a separate cell to add up each entry. Your help is greatly appreciated -- Regards Mike |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Mike,
Add this to a standard module Option Explicit Public myValue As Double Add these two to the worksheet's codemodule Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$A$1" Then Application.EnableEvents = False Target.Value = Target.Value + myValue myValue = Target.Value Application.EnableEvents = True End If End Sub Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Address = "$A$1" Then myValue = Target.Value End Sub Add this to the workbook's code module, changing the Sheet1 to the correct sheet name: Private Sub Workbook_Open() myValue = Worksheets("Sheet1").Range("A1").Value End Sub HTH, Bernie MS Excel MVP "Mike" wrote in message ... Hi, let's say I entered 5 in A1 and then the next day I updated the cell to 6. Can Excel total these two entries in A1 to get a total of 11. I don't want to use a separate cell to add up each entry. Your help is greatly appreciated -- Regards Mike |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Mike
Bernie's code will do the job, but you will have no "audit trail" in the event of incorrect data input. This can lead to problems. Gord Dibben MS Excel MVP On Fri, 25 Jul 2008 06:29:03 -0700, Mike wrote: Hi, let's say I entered 5 in A1 and then the next day I updated the cell to 6. Can Excel total these two entries in A1 to get a total of 11. I don't want to use a separate cell to add up each entry. Your help is greatly appreciated |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can cell entries be based on word entries in another cell ? | Excel Worksheet Functions | |||
Auto suggest entries? | Excel Worksheet Functions | |||
Auto-numbering new row entries | Excel Discussion (Misc queries) | |||
It auto changes font size on e-mail entries, WHY? | Excel Discussion (Misc queries) | |||
auto change number entries | Excel Worksheet Functions |