Running Totals

Dolphinboi

New Member
Joined
Oct 11, 2002
Messages
9
Hello All:
I work for a hotel, and every night the auditor has to fill out a hand written sheet. I want to know if there is a formula I can use to keep a running total of the month to date revenue using two columns. example

A:1= Today Revenue
B:1= Running total revenue.

Any help would be greatly appreciated.
 
Hi Dolphinboi:

The code:

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B" Then
If Not IsNumeric(Target) Then Exit Sub
Application.EnableEvents = False
[D7] = [D7] + [B7]
Application.EnableEvents = True
End If
End Sub

does work -- and Ivan's modifications mean that only when you enter a numeric in cell B7, the code updates the total in cell D7.

You have to make sure that it is entered as WorkSheet_Change code

Regards!

Yogi
 
Upvote 0

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

Forum statistics

Threads
1,215,753
Messages
6,126,677
Members
449,327
Latest member
John4520

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top