View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Carl Johnson Carl Johnson is offline
external usenet poster
 
Posts: 3
Default Line item calculation

Thanks Tom worked great.
"Tom Ogilvy" wrote in message
...
Right click on the sheet tab where you want this behavior. Paste in code
like this:

Private Sub Worksheet_Change(ByVal _
Target As Excel.Range)
If Target.Count 1 Then Exit Sub
If Target.Address = "$E$6" Then
If Not IsEmpty(Target) Then
If IsNumeric(Target) Then
Range("I6").Value = _
Range("I6").Value + Target.Value
Application.EnableEvents = False
Target.ClearContents
Application.EnableEvents = True
End If
End If
End If
End Sub


--
Regards,
Tom Ogilvy

"Carl Johnson" wrote in message
...
I would like to enter a line item expenditure(E6) and have the yearly

total
expenditures updated to reflect the change(I6) then the line item
expenditure cell cleared until repeated. Can I do this and if so how?

Your
help would surely be appreciated.