View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default displaying running total of value entered in same cell?

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