Forum Discussion
Excel formulas
Disappear to quantity. It's like I have 1 cookie in my hand (income) then I put it in a jar (hit enter) with 5 cookies, my hand became empty and the jar have +1 cookie. Overall quantity in a jar bacame 6.
Private Sub Worksheet_Change (ByVal Target As Range)
Range("B2").Value = Range("B2").value + Range("A2").value
End Sub
This will create a running total whether you press Enter or click away from cell A2.
Cheers
Damien
- Mix CyberFeb 16, 2018Copper Contributor
Hmm, I've never worked with macros before. Would it be hard to you to explain it in more detail or step by step?
- Damien_RosarioFeb 19, 2018Silver Contributor
Hi Mix Cyber
You will need to add the Developer tab to PowerPoint first.
- Right click onto a ribbon header and click onto Customize Ribbon.
- Tick Developer in the list to the far right.
- Click onto the OK button.
- In the Developer tab, click onto Visual Basic.
- Copy this text into the code window, save and see how you go?
Private Sub Worksheet_Change (ByVal Target As Range)
Range("B2").Value = Range("B2").value + Range("A2").value
End SubUnfortunately I am rusty with VBA haven't not used it in 10 years, but something like the above may give you a start!
Let us know how you go? Maybe the more experienced programmers here can add value as well?
Cheers
Damien
- Mix CyberFeb 21, 2018Copper Contributor
So this is my table.
here's what I'm trying to do
I guess there would be a little bit different algorithm