Cell change report

habil

New Member
Joined
Jul 24, 2018
Messages
4
I want to know Cell A1 how many times change in Cell B1.
Note: Cell A1 contains formula. I will do not input manually in A1.

Please advise me. Thanks in advance.
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
The value in A1 increments by 1 when the value in B1 changes...

Place code in Sheet module (right-click sheet tab \ view code \ paste in module window)
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address = "$B$1" Then Range("A1").Value = Range("A1").Value + 1
End Sub
 
Upvote 0
Thanks for your response. But if B1 contains formula ( say B1 =B5+65) then it is not work.

I means when I change B5, then B1 updated but A1 still same. no change in A1.
 
Upvote 0
If B5 is the cell amended by you, and formula in B1 is =B5+65 , then base the calculation on B5 changes...
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address = "$B$5" Then Range("A1").Value = Range("A1").Value + 1
End Sub
 
Upvote 0
Playing the Devil's advocate ..

Not sure how pedantic the OP wants to be but ..

a) If B5 houses a 5 and then has 5 re-entered in it, the code will increase the value in A1, yet the value in B1 has not actually changed (question was "how many times change in Cell B1")

b) B5 can be changed without Target.Address being "$B$5" so A1 could miss increasing when B5, and hence B1, changes.
 
Upvote 0
If cell A1 contains formula A1 =Today(),

Than I want to record How many times system date change. Even If I system date changed to back dated manually also I want to record.in cell B1.



Everyone highly requested to solve my problem.

Thanks in advance.
 
Upvote 0

Forum statistics

Threads
1,223,993
Messages
6,175,842
Members
452,675
Latest member
duongtruc1610

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