Excel ?

sdc1234

Board Regular
Joined
Mar 17, 2011
Messages
122
I have 2 seperate fields, daily and cumulative, I am trying to put a # in the daily and it will add on the the cumulative... any thoughts...
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
I think you will need a macro to do this. It seems dangerous, though, what if someone enters a wrong value somewhere along the line and doesn't realize it right away. your cumulative is wrong forever.

At the very least, do not automate the running of the macro. This code assumes your daily is in A1 and your Cumulative is in B1

Code:
Sub UpdateSum()
Dim MySum As Long
MySum = Range("B1").Value
Range("B1") = MySum + Range("A1").Value
End Sub
 
Upvote 0
thank you, I have 1 more for u may sound a little beginner like I havent used this program in a while bu the ? is does this code go into VB I believe it does right...

thx
 
Upvote 0
It does, Alt+F11 to launch the VB Editor, click on your workbook name at the left, then insert a module. Paste the code in, make any necessary changes and then close the window.

I always recommend doing this in a copy of your file before running the macro. You cannot undo anything done by a macro, and some unexpected things can happen.
 
Upvote 0
Formula based? Not that I'm aware of.
You could always copy the value in daily and paste special-> Add to cumulative.
 
Upvote 0
I tried doing the macro but for some reason it does not work is there something else I need to do after I insert the code

thx
 
Upvote 0

Forum statistics

Threads
1,224,570
Messages
6,179,611
Members
452,931
Latest member
The Monk

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