Tracking Change on the Formula Bar

amit700

New Member
Joined
Jul 3, 2009
Messages
2
Hey Guys

I was having some troubles with my excel coding. Let me brief you on my excel workbook first

1. I have a cell in which a value is inputted by the user, cell A5
2. Cell A6 has the formula "=200+300"

The problem
1. If i enter a number in cell A5, this number should be put directly in the formula bar of cell A6

for example: on entering 10 in cell A5, formula bar for cell A6 should become ="200+300+10"

then if i just keep changing the number in cell A5, it should be reflected in the above manner in cell A6. So now inputting 20 in cell A5, cell A6 should show me = "200+300+10+20"

and so on.

The idea is that i want to track the changes i am making to that particular cell over a number of days.

Is there a way by using VBA codes to achieve this?

Thanks a lot for your help.
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Maybe try this:

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target <> Range("A5") Then Exit Sub
Range("A6").Formula = Range("A6").Formula & "+" & Range("A5").Value
End Sub

Right click on the worksheet tab and select View Code and paste the above.

Dom
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,487
Members
448,967
Latest member
visheshkotha

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