+ Reply to Thread
Results 1 to 7 of 7

Automatically show the current time with hours, minutes and seconds with a formule

  1. #1
    Registered User
    Join Date
    11-05-2009
    Location
    NL
    MS-Off Ver
    Excel 2007
    Posts
    54

    Automatically show the current time with hours, minutes and seconds with a formule

    Hello,
    I wanted to use this subroutine as a formula =TimeStamp()
    The script will show the current time in hours, minutes and seconds.

    Please Login or Register  to view this content.

    Could someone give me some help?

    Thanks in advance,
    grid
    Last edited by grid; 12-22-2010 at 07:23 AM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,893

    Re: Automatically show the current time with hours, minutes and seconds with a formul

    Try this
    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    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: Automatically show the current time with hours, minutes and seconds with a formul

    Note that grid is asking for a Function. However, a function won't give you a timestamp because it will be reevaluated on recalculate. So you need a Sub.

    Maybe a little more explanation of the context of how you will use this will help us get you a better answer.

    And:
    Quote Originally Posted by alansidman View Post
    Try this
    Please Login or Register  to view this content.
    The result from this code is the same the result from Sub TimeStamp in the OP, but takes more steps to get there.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  4. #4
    Registered User
    Join Date
    11-05-2009
    Location
    NL
    MS-Off Ver
    Excel 2007
    Posts
    54

    Re: Automatically show the current time with hours, minutes and seconds with a formul

    Hello
    I found this:

    Please Login or Register  to view this content.

    Each change will also reflect the mousepointer because it will use a timer. I think this is the only workaround with a timer.


    Greets,
    grid

  5. #5
    Registered User
    Join Date
    11-05-2009
    Location
    NL
    MS-Off Ver
    Excel 2007
    Posts
    54

    Re: Automatically show the current time with hours, minutes and seconds with a formul

    Thanks, the goal of my question is to get a automatically updated clock in Excel. Could this be done so I won't see the timer is running?


    Greets,
    grid

  6. #6
    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: Automatically show the current time with hours, minutes and seconds with a formul

    Aha. You want...a "clock". Yes, this code is one way of getting that, it will update the time once per second.

    Here is the code enhanced to include the ability to cancel the timer, if you need to.

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    11-05-2009
    Location
    NL
    MS-Off Ver
    Excel 2007
    Posts
    54

    Re: Automatically show the current time with hours, minutes and seconds with a formul

    Thank you 6StringJazzer! I also found some information on this website about timers: http://www.cpearson.com/excel/OnTime.aspx

    Greets,
    grid

+ 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