+ Reply to Thread
Results 1 to 11 of 11

Static time and date stamp

  1. #1
    Registered User
    Join Date
    03-02-2007
    Posts
    4

    Static time and date stamp

    Hi
    I would like to have a static time and date stamp automatically enter into two adjacent cells after a person has entered their intials in a cell.

    Using an an "if then else" where it checks to see if initials have been entered then using now() will not work as it is always up dates when the sheet is recalculated. I dont think you can use ctrl+; in an =if( condition,true,false) statement.
    Any ideas.
    Thanks

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    You can not get a static date & time in a cell using formulas you will need to use a change event macro

    'To install macro to correct location

    Copy this macro
    GoTo Excel
    Select sheet this is to appy to
    Right Click on Sheet Name Tab > select View Code
    Past macro into the Worksheet Module displayed

    Change the column numbers in red to suit

    Please Login or Register  to view this content.
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  3. #3
    Registered User
    Join Date
    03-02-2007
    Posts
    4

    static dat time stamp

    Thanks
    I will try.
    My knowlege of VBA is limited, but if I undertsand the code it will trigger the event when data is entered in col 3 and post date and time in cols 4 and 5. So will this update each time data is entered in col 3?
    Unfortunatley I did not mention orginally, there are 24 rows and it's at each row when a person enters their initials it updates with time and date for that row.


    Thanks

  4. #4
    Registered User
    Join Date
    03-02-2007
    Posts
    4

    Thanks the macro works great

    Thanks the macro works great

  5. #5
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    Do you have it working as required or do you need it to be modified to work on rows or a range of cells.

    If yes post details of rows or cell ranges

  6. #6
    Registered User
    Join Date
    03-02-2007
    Posts
    4
    Hi
    Yes, the macro works as needed on a cells. Thanks.
    The only thing is I protected the range of cells so they can't be changed by the user but that also prevents the macro from updating. Is it easy to temporarily unlock them in the macro, update and lock them again?
    Thanks

  7. #7
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    This will work if you have not used a password to protect the sheet

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    03-02-2007
    Posts
    2
    mudraker,
    This is exactly what I need it as well. I have a quick question though... how to modify the macro to only update the same cell (with the date stamp) if someone modifies the sheet?
    Thanks a lot

  9. #9
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    Use the previous enclosed macroand change
    Cells(Target.Row, 4) = Now()
    to
    Please Login or Register  to view this content.
    Change Red cell reference (a1) to suit your needs

  10. #10
    Registered User
    Join Date
    01-17-2014
    Location
    Bastogne, Belgium
    MS-Off Ver
    Excel 2003
    Posts
    1

    Smile Re: Static time and date stamp

    This solution is very usefull for me. Thanks.

    Quote Originally Posted by mudraker View Post
    You can not get a static date & time in a cell using formulas you will need to use a change event macro

    'To install macro to correct location

    Copy this macro
    GoTo Excel
    Select sheet this is to appy to
    Right Click on Sheet Name Tab > select View Code
    Past macro into the Worksheet Module displayed

    Change the column numbers in red to suit

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    09-30-2015
    Location
    canada
    MS-Off Ver
    2013
    Posts
    1

    Re: Static time and date stamp

    Hi,
    I am trying to update a column with date stamps if the corresponding cell in first column is updated with ABC then time stamp the corresponding cell in column 2 and if the first column cell is updated with XYZ update column 3 corresponding cell with time stamp, also these dates need to be static once entered they shouldn't change unless the cell is wiped clean purposely.

+ 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