Closed Thread
Results 1 to 5 of 5

keeping track of time

Hybrid View

  1. #1
    jhahes
    Guest

    keeping track of time

    Is there a simple way to do the following.

    Just 1 sheet.


    I want to have a user click a command button and it puts the time at that moment in cell A2. I don't want it to be a now() or today() because when they are done working i want them to click another button that puts the time in cell B2, and my formula will figure the time difference.

    Thanks for any help.


    Josh

  2. #2
    Registered User
    Join Date
    10-03-2005
    Posts
    10
    Josh-

    Sub timedelay()
    Cells(2, 1) = "=now()"
    Cells(2, 1) = Cells(2, 1)
    End Sub

    this uses the "now" function then immediately writes over the "function" with the value... this way it is no longer a function (which will change with time), but the value.

  3. #3
    jhahes
    Guest

    thanks

    Thanks Tad, works great!!!

  4. #4
    Myrna Larson
    Guest

    Re: keeping track of time

    Or, more simply,

    Cells(2, 1).Value = Now()


    On Tue, 4 Oct 2005 13:33:44 -0500, tad_wegner
    <tad_wegner.1we62i_1128452737.6278@excelforum-nospam.com> wrote:

    >
    >Josh-
    >
    >Sub timedelay()
    >Cells(2, 1) = "=now()"
    >Cells(2, 1) = Cells(2, 1)
    >End Sub
    >
    >this uses the "now" function then immediately writes over the
    >"function" with the value... this way it is no longer a function (which
    >will change with time), but the value.


  5. #5
    Bill Martin
    Guest

    Re: keeping track of time

    jhahes wrote:
    > Is there a simple way to do the following.
    >
    > Just 1 sheet.
    >
    >
    > I want to have a user click a command button and it puts the time at
    > that moment in cell A2. I don't want it to be a now() or today()
    > because when they are done working i want them to click another button
    > that puts the time in cell B2, and my formula will figure the time
    > difference.
    >
    > Thanks for any help.
    >
    >
    > Josh
    >
    >



    Built into Excel is the "Ctrl ;" function. It does what you want. After it
    time stamps the active cell you can format the cell to show date or time or
    whatever it is you wanted.

    Bill

Closed 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