Hi, I need to keep a cumulative total in one cell P2 as cell B2 is updated
with new entries. Thanks in advance
Hi, I need to keep a cumulative total in one cell P2 as cell B2 is updated
with new entries. Thanks in advance
If I understand your question correctly you will be overwiting the value in
B2 and you want to sum the total in P2 each time you change...
Here is some code to do that:
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$2" Then _
ActiveSheet.Range("P2").Value = ActiveSheet.Range("P2").Value +
Target.Value
End Sub
To paste the code Right Click on the sheet tab -> Select View Code (The
visual basic screen will open up) -> Paste the code...
To be safe you should validate what is being enetered in cell B2. Data ->
Validation ...(make sure that it is a number)
HTH
"Jesse" wrote:
> Hi, I need to keep a cumulative total in one cell P2 as cell B2 is updated
> with new entries. Thanks in advance
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks