+ Reply to Thread
Results 1 to 4 of 4

=TODAY() but showing number from 1-30 or 31

  1. #1
    Registered User
    Join Date
    09-07-2012
    Location
    Berlin, Germany
    MS-Off Ver
    Excel 2007
    Posts
    57

    =TODAY() but showing number from 1-30 or 31

    Hi guys,

    I'm familiar with the =TODAY() function, my knowledge doesn't get any further than day. Unfortunately.

    What I need is to have a value of a number from 1 to 30 or 31 depending on the day of the month. If today is 6th of December, then I would like to have "6" shown today, and tomorrow 7 obviously.

    However, when december ends and January starts, I would like that value to remain constant (31) and never change because December ended. Then I would start with January and go over again... on the 5th I would like to have it show "5", on the 21st "21" etc., but in February I would like to have it "31" and remain constant... and further on...

    I'd much appreciate help in this matter !

    Thanks,
    vemix

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,736

    Re: =TODAY() but showing number from 1-30 or 31

    You could set up a count of days from the start of the month, limited to the end of the month, e.g. use this formula for December 2012

    =MEDIAN(TODAY()-DATE(2012,12,0),31,0)

    That will give you 6 today (6th December 2012) and will increment up to 31 but then remain at 31 indefinitely, do the same for Jan and Feb etc. Feb would be

    =MEDIAN(TODAY()-DATE(2013,2,0),28,0)

    before the month arrives it will show zero
    Last edited by daddylonglegs; 12-06-2012 at 09:16 AM.
    Audere est facere

  3. #3
    Registered User
    Join Date
    11-30-2012
    Location
    Houston, TX
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: =TODAY() but showing number from 1-30 or 31

    EDIT: Nevermind, I had that wrong...
    Last edited by areichgott; 12-06-2012 at 10:45 AM.

  4. #4
    Registered User
    Join Date
    11-30-2012
    Location
    Houston, TX
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: =TODAY() but showing number from 1-30 or 31

    Use this:
    =IF(DAY(TODAY())>=5,DAY(TODAY()),DAY(EOMONTH(TODAY(),-1)))

+ 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