Jer-XL-emy
Board Regular
- Joined
- Aug 27, 2007
- Messages
- 60
Hello, I bow down to the genuises that reside here.
My Question is: How can I have a cell count the number of times another cell changes.
I have a macro found on this forum that does work when I manually change the cell, but will not work when the cell changes automatically.
Here is what I have
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Column = 22 Then Target.Offset(0, -5).Value = Target.Offset(0, -5).Value + 1
If Target.Count > 1 Then Exit Sub
If Target.Column = 23 Then Target.Offset(0, -5).Text = Target.Offset(0, -5).Text + 1
End Sub
(modified for my purposes)
This is a macro written from a longtime poster here (I cannot find where I found it so I cannot give him the credit he deserves)
Again, it works when I change the cell manually, but there is a formula behind it and I need it to work when the cell changes on the surface
I am assuming it has something to do with the .value - but not sure
I thank you in advance
My Question is: How can I have a cell count the number of times another cell changes.
I have a macro found on this forum that does work when I manually change the cell, but will not work when the cell changes automatically.
Here is what I have
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Column = 22 Then Target.Offset(0, -5).Value = Target.Offset(0, -5).Value + 1
If Target.Count > 1 Then Exit Sub
If Target.Column = 23 Then Target.Offset(0, -5).Text = Target.Offset(0, -5).Text + 1
End Sub
(modified for my purposes)
This is a macro written from a longtime poster here (I cannot find where I found it so I cannot give him the credit he deserves)
Again, it works when I change the cell manually, but there is a formula behind it and I need it to work when the cell changes on the surface
I am assuming it has something to do with the .value - but not sure
I thank you in advance