+ Reply to Thread
Results 1 to 5 of 5

VBA to insert a timestamp when a value changes

  1. #1
    Registered User
    Join Date
    08-12-2022
    Location
    USA
    MS-Off Ver
    MS Office Professional Plus 2019
    Posts
    8

    VBA to insert a timestamp when a value changes

    Please see first reply thread for my question thank you!

    Cross-posted at https://www.excelforum.com/excel-pro...e-changes.html --Moderator
    Last edited by 6StringJazzer; 08-12-2022 at 04:39 PM.

  2. #2
    Registered User
    Join Date
    08-12-2022
    Location
    USA
    MS-Off Ver
    MS Office Professional Plus 2019
    Posts
    8

    Re: VBA to insert a timestamp when a value changes

    Hi Excel experts,

    I would highly appreciate if someone could help me figure out a VBA to insert a date and time stamp in a cell based on the value change from another cell.

    Please note this is not a request to ask when a data entry action has been performed to make the change.

    It is a request regarding when selecting a certain value from a data validation dropdown list to change the value in another cell based on IF function, so a date and time stamp can automatically populate to mark the change.

    Example from the attached sheet:

    3 different men named A, B and C.

    A weighs 180 lbs., B weighs 200 lbs., and C weighs 210 lbs.

    By default, Cell B3's value is always A. So Cell C3's value is always 180.

    Changing the value in Cell B3 from A to B, can ONLY be done by picking "B" from a dropdown list in Cell B3.

    This is to say, NO MANUAL DATA ENTERING/ CHANGING can be done to make this value change from A to B.

    In this case, how would I be able use VBA to insert a date and time stamp in Cell D3, when every time a new value in Cell B3 has been SELECTED/ PICKED (NOT ENTERED) from the dropdown list?

    For instance, currently Cell B3 is "A". I picked "B" in Cell B3's dropdown list on 08/12/22, 12:00:00pm.

    What would be a VBA to mark this stamp automatically in Cell D3?

    Again, your help is GREATLY appreciated!

    Thank you so much!!

  3. #3
    Registered User
    Join Date
    08-12-2022
    Location
    USA
    MS-Off Ver
    MS Office Professional Plus 2019
    Posts
    8

    Re: VBA to insert a timestamp when a value changes

    Please see example files thank you.
    Attached Images Attached Images
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    08-12-2022
    Location
    USA
    MS-Off Ver
    MS Office Professional Plus 2019
    Posts
    8

    Re: VBA to insert a timestamp when a value changes

    The formula in C3 is "=IF(B3="C",210,IF(B3="B",200,IF(B3="A",180)))".

    In B3 there is a dropdown list of "A", "B", "C".

    Just wanted to have a timestamp in D3, whenever I pick A or B or C in Cell B3 then Cell C3 changes to 180, 200 and 210.

    The timestamp should mark the time when it changes from 180 to 200, 200 to 210 etc.

    Thank you so much!!!!

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: VBA to insert a timestamp when a value changes

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not told us about this. You are required to do so.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important.

    I have added the link because you are a new member.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Auto insert timestamp
    By manemzjum in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-10-2022, 05:06 PM
  2. [SOLVED] VBA - Insert timestamp if cell to left = x
    By Sammy Boy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-13-2020, 04:00 PM
  3. Insert Timestamp on same row that macro is run
    By marcosis in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-18-2017, 11:06 AM
  4. [SOLVED] Combine mail VBA, and make it insert a timestamp.
    By horsefish01 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-20-2015, 09:21 AM
  5. [SOLVED] VBA to sort by timestamp, insert decimal, and transpose to new worksheet
    By blueflwr19 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-12-2014, 05:30 PM
  6. [SOLVED] Insert timestamp when ticked....
    By Ben1985 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-09-2013, 06:46 AM
  7. insert date timestamp to end of spreadsheet
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-08-2006, 12:25 PM

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