• Static date in Excel

    • This topic has 2 replies, 2 voices, and was last updated 15 years ago.
    Author
    Topic
    #468816

    Hello,

    I am trying to configure a spreadsheet to allow the user to enter a date to track when people arrive and leave. The Now() function will update. I was trying to use Now in a function by creating a Module in my spreadsheet (Excel 2007)

    [indent]Function StaticDate()
    ‘ Returns static date
    StaticDate = Now
    End Function
    [/indent]

    This function works, but I want to assign it to a keyboard shortcut, but I can not figure out how to do that in Excel 2007

    Is my function the easiest way to add the static date?

    Thanks,

    Andy

    Viewing 1 reply thread
    Author
    Replies
    • #1223120

      Is that to put today’s date into a cell?
      If it is then just use CTRL ; and SHIFT CTRL :

      CTRL; = Date SHIFT CTRL : = Time

      Failing that you can use a Macro to Insert the Date and Time from Now into the Active Cell

      Code:
      Sub TimeNow()
           ActiveCell=Now
      End Sub
      

      You can then Add this to a KeyBoard ShortCut
      by going into Tools => Macro => Macros Selecting the Macro and then pressing the Options Button

      In 2007 that is

      Developer Ribbon => Macros then as Above

      Tip Use SHIFT CTRL T for example to stop overriding the normal Shortcut keys

      Also, IF you put the Macro into their Personal Macro Workbook, it would be available for ALL their spreadsheets.

    • #1223130

      Thanks! I hate it when I am off in left field

      Andy

    Viewing 1 reply thread
    Reply To: Static date in Excel

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: