View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Colin Fisher[_2_] Colin Fisher[_2_] is offline
external usenet poster
 
Posts: 2
Default displaying running total of value entered in same cell?


Hi Mike

Thank you for the response. I will give the coding a try. Pehaps if I can be
more specific about the problem, you might know a better way around it.

User is entering several integer values on a table. Each value is to be
added to a sum on another table. Perhaps a method of verification could be
introduced to cut down on the chance of errors in data entry. It would be
helpful if the data for each weeks entries could be retained and displayed by
entering the date for the beginning of that week. Unfortunately the number
of weeks is unknown.

Thanks for the time and effort you have provided me with.

Colin
"Mike H" wrote:

Hi,

Right click your sheet tab, view code and psate this in. It takes the calue
from A1 and accumullates those values in sheet2 A2. Accepts integer values
only

Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
If Target.Address = "$A$1" And IsNumeric(Target) And _
Target.Value - Int(Target.Value) = 0 Then
Sheets("Sheet2").Range("A2").Value _
= Sheets("Sheet2").Range("A2").Value + Target.Value
End If
End Sub

Mike

"Colin Fisher" wrote:

I want to allow the user to type an Integer value into a worksheet cell. The
cell value is added to the previous cell entries from that same cell and
displayed in a linked cell on a separate worksheet.

If possible, all values for previous weeks entries on the worksheet can be
retrieved and displayed without the need to store each spreadsheet as a
separate file.

Any help on this would be grealty appreciated