+ Reply to Thread
Results 1 to 5 of 5

Timestamp in Reference to a Change in Value of a Cell

  1. #1
    Registered User
    Join Date
    05-21-2012
    Location
    Makati, Philippines
    MS-Off Ver
    Excel 2007
    Posts
    3

    Timestamp in Reference to a Change in Value of a Cell

    Hi everyone,
    I would like to ask if there is a way to create a timestamp if the active cell changes to certain value--let's say "IN PROCESS".
    I created a code but it doesn't register/respond during the time the cell changes into "IN PROCESS" but instead when you click the activecell with "IN PROCESS" in it. Here's the code:

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If ActiveCell.Value = "IN PROCESS" Then
    Cells(Target.Row, 5).Value = Time()
    End If
    End Sub

    I'm just a beginner and I would like to ask if there is a way to register the time in response to a change in the Active Cell from one value to another.

    -Martin

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Timestamp in Reference to a Change in Value of a Cell

    Hi and welcome to the forum.

    One way, is this.

    http://chandoo.org/wp/2009/01/08/tim...-formula-help/
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Timestamp in Reference to a Change in Value of a Cell

    Hi try this
    Please Login or Register  to view this content.
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

  4. #4
    Registered User
    Join Date
    05-21-2012
    Location
    Makati, Philippines
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Timestamp in Reference to a Change in Value of a Cell

    Hi Fotis 1991,

    I tried using excel formulas but there is a need to use VBA because I realized that excel formulas can't provide time stamps that stay permanent. They change during saving or during the time you accidentally click the cell and press Enter. I'm having difficulty because there are two adjacent cells that I need to change in reference to a specific change in the active cell. For example, during the time the activecell changes to "IN PROCESS" it does a time stamp on the -Time Start- column and when the active cell changes to "DONE" it does a time stamp on the -Time End- Column.

    Thank you by the way. Your reply to this thread is highly appreciated.

    -Martin

  5. #5
    Registered User
    Join Date
    05-21-2012
    Location
    Makati, Philippines
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Timestamp in Reference to a Change in Value of a Cell

    Hi Tom,

    I tried your code but it still produces the same result like the first code I provided. The improvement is regarding the Target.Offset which now makes it easier to assign the adjacent cell in reference to the activecell. The timestamp however does not register in response to a change in the activecell from one value to another but instead only verifies if the activecell contains "IN PROCESS" and if it does, then performs a timestamp. Therefore there is a need to click the the cell containing "IN PROCESS" again in order to perform a timestamp. However, with this setup the timestamp is invalidated since by accidentally clicking the cell or clicking it for example to change the value into "DONE" will change the registered time of the adjacent cell.

    Thank you for your reply. The help you have provided is greatly appreciated.

    -Martin

+ 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