Date Stamp in a single cell when several columns change

  • Hi everyone,


    To provide some context for my issue, I'm creating a project coordination spreadsheet meant to keep track of progress on proposals from start to finish. In order to ensure that proposals aren't simply abandoned when things are getting busy with other projects, I got to work building a code that would keep track of when items within different columns were updated and create a time stamp in another column of what was updated in that specific row. However this was not what I was aiming to accomplish. My goal was to have whatever was updated in these columns would return an updated date and time in a single cell, not every cell in the column adjacent. So whenever the sheet is updated, the time/date of said update is recorded in a single cell on the same sheet. Is there a way to make this possible? I'm very new to VBA coding and would like some assistance. You can find my current code (and password coding) below to help you understand what I'm working with.



    Thanks,


    - T

  • Hi


    Welcome to the forum:


    Do you want store all changes (I mean, history of the changes) every changes on the column (what changed to what and the time of both changes) etc..
    Can you please provide a sample of this?


    Regards,


    Maqbool

  • I use a very basic time stamp that is button activated. Possibly you could modify, what I use.

    Code
    Sub Time_Stamp
    Range ("H19").Value = Now()
    End Sub
  • Thanks for your input all,


    To clarify, I want each sheet to display the last time that sheet was edited in a single cell. Also, this will be a shared workbook, so others will be adding to it over time.


    [ATTACH=JSON]{"alt":"Click image for larger version Name:\t2.PNG Views:\t0 Size:\t41.0 KB ID:\t1225604","data-align":"none","data-attachmentid":"1225604","data-size":"full"}[/ATTACH]


    The image above shows the spreadsheet I'm dealing with. Currently I have a box next to the grayed section to record any changes on each row. It would be helpful if whenever any changes occur in the grey space, a single cell would record the last time an edit was made. I don't need to keep the records of past edits, just a display of the most recent edit, as the goal is to ensure that proposal managers are continuing to work on proposals to completion and to keep track of ongoing proposals. I can't rely on people pressing the button when they are done editing (laziness/procrastination/rushing always being an issue). I have tried the track changes option, but since I was aiming to combine it with conditional formatting (say when the date recorded is more than 30 days from today's date, the cell would highlight) this wouldn't entirely work. Hopefully this clarifies things.


    Thanks,


    - T

  • Have you tried modifying your line

    Code
    [align=left][COLOR=#252C2F][FONT=Courier][SIZE=12px]Intersect(Target.EntireRow, Columns(DateColumn)).Value = Now[/SIZE][/FONT][/COLOR][/align]

    to

    Code
    [align=left][COLOR=#252C2F][FONT=Courier][SIZE=12px]Intersect(Target.EntireRow, Columns(DateColumn)).Value = Now()[/SIZE][/FONT][/COLOR][/align]
  • This modification doesn't change anything I'm afraid. When a given row changes, it generates a time stamp in a cell on the same row, rather than update a specific cell if any of the rows are changed. Thanks everyone for their input, I understand this isn't the easiest problem to fix.

  • Hello,


    You could test following event macro


    Code
    Private Sub Worksheet_Change(ByVal Target As Range)
    Const ColumnsToMonitor As String = "L:Q"
    Const DateColumn As String = "R"
      If Intersect(Target, Range(ColumnsToMonitor)) Is Nothing Then Exit Sub
      Cells(Target.Row, DateColumn) = Now
    End Sub


    Hope this will help

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • It didn't I'm afraid. Maybe this will clarify things better. What I'm looking for is that whenever a cell within the Range A2 to E20 are changed, the cell in A1 records the current time the last edit took place.

  • Slight modification ... since things seem to have been modified ... since your first message ..


    Code
    Private Sub Worksheet_Change(ByVal Target As Range)
       If Target.Count >1 Then Exit Sub
       If Intersect(Target, Range("A2:E20")) is Nothing then Exit Sub
       Cells(1,1) = Now
    End Sub


    Hope this will help

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • Glad you could fix your problem ;)


    Thanks for your Thanks :)

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

    Edited once, last by Carim ().

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!