Adding within a cell

benmmaddog

New Member
Joined
Jul 20, 2011
Messages
2
hello, what I'm wanting to do is say i have 10 in a cell and i what to add 5 to it , i don't want to erase the 10 and type in 15, i want to be able to either just type in a 5 in that cell or put 5 in a adjacent cell and 15 will be shown in the original cell . its like a running total cause the next time say i want to add like 20 i want the the original cell to show 35 . i hope that makes sense. its like an inventory. i metal detect so i want to keep a running total of the coins i find.
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Welcome to the board..
You'll need VBA code for that..

Right click on the sheet's Tab, View code
Paste the following

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$1" Then Range("A1").Value = Range("A1").Value + Target.Value
End Sub

That will add the value of B1 to A1 each time B1 changes.


Hope that helps.
 
Upvote 0

Forum statistics

Threads
1,224,578
Messages
6,179,654
Members
452,934
Latest member
mm1t1

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