![]() |
I need to keep a count of the times a cell is changed
I have a cell that contains a date of which something was last used. Is
there anyway that everytime I change that date, I have another cell that keeps a count of that? For instance if A1 contains 8/28/2005. . .this is the first instance so therefore B1 contains 1. If I change A1 to 9/28/2005 then B1 would automatically add 1 to its count so it now shows 2. Any help would be greatly appreciated. |
I need to keep a count of the times a cell is changed
Hi Paul,
Yo can do this with a Change event procedure (change cell references "A1" and "B1" as you need them): Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address(False, False) = "A1" Then Application.EnableEvents = False Range("B1") = Range("B1") + 1 Application.EnableEvents = True End If End Sub Regards, Stefi €˛Paul Cahoon€¯ ezt Ć*rta: I have a cell that contains a date of which something was last used. Is there anyway that everytime I change that date, I have another cell that keeps a count of that? For instance if A1 contains 8/28/2005. . .this is the first instance so therefore B1 contains 1. If I change A1 to 9/28/2005 then B1 would automatically add 1 to its count so it now shows 2. Any help would be greatly appreciated. |
I need to keep a count of the times a cell is changed
I guess this is some type of VB code. I really don't know much about using
that. Can you point me in the right direction? "Stefi" wrote: Hi Paul, Yo can do this with a Change event procedure (change cell references "A1" and "B1" as you need them): Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address(False, False) = "A1" Then Application.EnableEvents = False Range("B1") = Range("B1") + 1 Application.EnableEvents = True End If End Sub Regards, Stefi €˛Paul Cahoon€¯ ezt Ć*rta: I have a cell that contains a date of which something was last used. Is there anyway that everytime I change that date, I have another cell that keeps a count of that? For instance if A1 contains 8/28/2005. . .this is the first instance so therefore B1 contains 1. If I change A1 to 9/28/2005 then B1 would automatically add 1 to its count so it now shows 2. Any help would be greatly appreciated. |
All times are GMT +1. The time now is 02:19 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com