stirlingmw
Board Regular
- Joined
- Feb 18, 2013
- Messages
- 75
Morning All
I hope the Thread title sort of explains what I am trying to do.
I am using the following code to return the sum of times from Column K in the corresponding cell in Column L (Basically a running total as times are added). The code works fine to add the total time into Column L, but if I change any of the times in the range "K10 to K29" I need the running total in Column L to recalculate.
Any Ideas?
Thanks Steve
I hope the Thread title sort of explains what I am trying to do.
I am using the following code to return the sum of times from Column K in the corresponding cell in Column L (Basically a running total as times are added). The code works fine to add the total time into Column L, but if I change any of the times in the range "K10 to K29" I need the running total in Column L to recalculate.
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("K11:K29")) Is Nothing Then
If Target <> "" Then
Target.Offset(0, 1) = WorksheetFunction.Sum(Range(Range("K10", Target.Address))
End If
End If
End Sub
Any Ideas?
Thanks Steve
Last edited: