+ Reply to Thread
Results 1 to 3 of 3

How do I automaticly insert the time with seconds

  1. #1
    AussieAVguy
    Guest

    How do I automaticly insert the time with seconds

    I need to be able to have excel insert the current time including seconds
    into a cell. I've tried the Now() function but it keeps updating everytime
    the spreadsheet recalculates. The shortcut ctrl+shift+; doesn't give seconds
    and I'd prefer it to happen automaticly.

    Anyone??

  2. #2
    Gary's Student
    Guest

    RE: How do I automaticly insert the time with seconds

    You are half way there. Use the NOW() function and afterwards copy the cell
    and paste it Value onto itself. This converts the function into a fixed value
    --
    Gary's Student


    "AussieAVguy" wrote:

    > I need to be able to have excel insert the current time including seconds
    > into a cell. I've tried the Now() function but it keeps updating everytime
    > the spreadsheet recalculates. The shortcut ctrl+shift+; doesn't give seconds
    > and I'd prefer it to happen automaticly.
    >
    > Anyone??


  3. #3
    Gord Dibben
    Guest

    Re: How do I automaticly insert the time with seconds

    Aussie

    Automatically when you select a particular cell would require event code like
    this....

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    On Error GoTo enditall
    Application.EnableEvents = False
    If Target.Address = "$B$3" Then
    Target.Value = Format(Now(), "h:mm:ss AM/PM")
    End If
    enditall:
    Application.EnableEvents = True
    End Sub

    To insert the time in the active cell use this macro assigned to a button.

    Sub NOWTIME()
    ActiveCell.Value = Format(Now(), "h:mm:ss AM/PM")
    End Sub


    Gord Dibben Excel MVP

    On Tue, 14 Jun 2005 01:09:01 -0700, "AussieAVguy"
    <AussieAVguy@discussions.microsoft.com> wrote:

    >I need to be able to have excel insert the current time including seconds
    >into a cell. I've tried the Now() function but it keeps updating everytime
    >the spreadsheet recalculates. The shortcut ctrl+shift+; doesn't give seconds
    >and I'd prefer it to happen automaticly.
    >
    >Anyone??



+ 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