Forum Discussion
Mix Cyber
Feb 15, 2018Copper Contributor
Excel formulas
Hi, Is there a way to enter a number in a cell - "income" then hit "enter" button and it disappears summing all entered numbers in next cell "quantity" ?
Mark Fitzgerald
Feb 15, 2018Iron Contributor
I don't understand! Where do you want the entered number to "Disappear" to? You could make it "disappear" in many ways - conditional format to set font color the same as background color;; use VBA to Undo your entry; use VBA to move it somewhere else; etc.
Mix Cyber
Feb 16, 2018Copper Contributor
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.
- Damien_RosarioFeb 16, 2018Silver ContributorYou may need a macro, something like:
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