Adding value in single Cell

prakashjoshi87

New Member
Joined
Jun 9, 2015
Messages
11
Hi,

pls help me ..

i have value in C2 which is change daily . i want to do C2 value Total at D2 as Running total

like

yesterday c2 value is 10 and d2 value also 10

today c2 value is 5 then d2 value will be 10+5=15

pls suggest me a formula or vb code.
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Try this:
Assuming you enter the value into "C2" manually. Try using this script instead:
Code:
Sub Add_Data()
Dim num As Integer
num = InputBox("Enter Amount")
Cells(2, 3).Value = num
Cells(2, 4).Value = Cells(2, 4).Value + Cells(2, 3).Value
End Sub
 
Last edited:
Upvote 0
Thanks for Reply
its working but its create a inputbox , i don't need inputbox and also if i enter value like 100000 its showing error. and also c2 value not manually entered its formula base
 
Upvote 0
Hi

Insert in the worksheet module:

Code:
Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address = "$C$2" Then
    Application.EnableEvents = False
    Range("D2").Value = Range("D2").Value + Range("C2").Value
    Application.EnableEvents = True
End If
End Sub

Each time you type a new value in C2, D2 will update.
 
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,270
Members
452,628
Latest member
dd2

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