+ Reply to Thread
Results 1 to 5 of 5

today() without changing after daychange

  1. #1
    Registered User
    Join Date
    07-11-2011
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    2

    today() without changing after daychange

    hi there again,
    i would like to use some function like today()in my excel worksheet, but i don't want it to be change after a day change.
    is this possible?
    Thank you
    great forum you have here
    regards
    Last edited by trampy; 07-17-2011 at 05:00 PM.

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: today() without changing after daychange

    You specify a static date using the DATE function.

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

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

    Re: today() without changing after daychange

    Here is simple code to attach to a macro key or you can change the sub to a function and it will then become a User Defined Function.

    Please Login or Register  to view this content.
    Alan
    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

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: today() without changing after daychange

    Something like
    Please Login or Register  to view this content.
    In any cell test it by typing the formula =StaticDate(). Format the cells to show date eg dd/mm/yyyy
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  5. #5
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: today() without changing after daychange

    You can also just press Ctrl+; to get today's date in the active cell.

    Dom

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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