+ Reply to Thread
Results 1 to 7 of 7

Time Stamp each time a there is a cell entry

Hybrid View

  1. #1
    Registered User
    Join Date
    03-19-2007
    Posts
    29

    Time Stamp each time a there is a cell entry

    Hi all,


    I've used the =NOW() function but it applies only to any changes in the whole document.

    WHat if I want to to know the time a guest arrived every time I "marked"the attence in excel? I would like to preserve the arrival time of all guest.

    Does anyone knows how?

    Thanks

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885
    The following code will insert the current time in the active cell:
    Sub TimeStamp()
        Application.SendKeys ("^+;{ENTER}")
    End Sub
    You can adjust this to be triggered by a command button, a worksheet change event, a checkbox changing state, etc. and point the SendKeys to a specific cell if you wish.

  3. #3
    Registered User
    Join Date
    02-20-2007
    Posts
    2
    Quote Originally Posted by pjoaquin
    The following code will insert the current time in the active cell:
    Sub TimeStamp()
        Application.SendKeys ("^+;{ENTER}")
    End Sub
    You can adjust this to be triggered by a command button, a worksheet change event, a checkbox changing state, etc. and point the SendKeys to a specific cell if you wish.
    wow a really usefull code but how about if we want to include date on it or "date" only??

    thx in advance

  4. #4
    Registered User
    Join Date
    03-19-2007
    Posts
    29
    Quote Originally Posted by pjoaquin
    The following code will insert the current time in the active cell:
    Sub TimeStamp()
        Application.SendKeys ("^+;{ENTER}")
    End Sub
    You can adjust this to be triggered by a command button, a worksheet change event, a checkbox changing state, etc. and point the SendKeys to a specific cell if you wish.
    Hi!Am still a bit of an idiot when it comes to coding,so say if I enter a guest attendance in cell A1. When the value in cell A1 >=1, then I need to fill cell B1 with the time stamp.

    How may I insert the wonderful code that you've suggested?

  5. #5
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    sheclaire

    have a look at
    http://www.excelforum.com/showthread.php?t=595210

    It covers the exact same topic
    And can be easily modified to suit your needs once you provide full details of where the date & time is to be entered in relation to the cell that was just changed.
    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.

  6. #6
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885
    iluvtorrent,

    Mud's code (link in his post above) provides a nice way of doing it, but for a 'quick-and-dirty' method like my SendKeys post, you could use:

    Application.SendKeys ("^;{ENTER}")
    To enter just the current date.

    Even in the Excel worksheet you can do this, you don't need code unless you want to automate it:

    In any cell, press CTRL + ; (CTRL+SEMI-COLON) and it will insert today's date as static (won't change if you open the sheet tomorrow)

    and in any cell, press CTRL + SHIFT + ; (CTRL+SHIFT+SEMI-COLON) and it will insert the current time as static.

    Mud - thanks for the follow-up.

  7. #7
    Registered User
    Join Date
    03-19-2007
    Posts
    29

    Red face

    Quote Originally Posted by pjoaquin
    iluvtorrent,

    Mud's code (link in his post above) provides a nice way of doing it, but for a 'quick-and-dirty' method like my SendKeys post, you could use:

    Application.SendKeys ("^;{ENTER}")
    To enter just the current date.

    Even in the Excel worksheet you can do this, you don't need code unless you want to automate it:

    In any cell, press CTRL + ; (CTRL+SEMI-COLON) and it will insert today's date as static (won't change if you open the sheet tomorrow)

    and in any cell, press CTRL + SHIFT + ; (CTRL+SHIFT+SEMI-COLON) and it will insert the current time as static.

    Mud - thanks for the follow-up.
    Thank you guys! I apologize for overlooking that thread.

+ 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