+ Reply to Thread
Results 1 to 3 of 3

I need to keep a count of the times a cell is changed

  1. #1
    Paul Cahoon
    Guest

    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.

  2. #2
    Stefi
    Guest

    RE: 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.


  3. #3
    Paul Cahoon
    Guest

    RE: 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.


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1