+ Reply to Thread
Results 1 to 3 of 3

automatic change of date according to month

  1. #1
    Registered User
    Join Date
    01-15-2013
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    4

    automatic change of date according to month

    I Have a worksheet which has the days of the month in the rows. (01/01/2013, 02/01/2013,.....31/01/2013). I need to use this worksheet every month and I would like that the dates change automatically according to the particular month.

    thanks

  2. #2
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: automatic change of date according to month

    If you want the dates to start in A2, try this in A2, then fill down to row 32:

    =DATE(YEAR(NOW()),MONTH(NOW()),DAY(ROW()-1))

    As soon as midnight hits of the next month, the dates should update automatically.

    ... or if you want to be able to put it anywhere on your sheet, change the DAY(ROW()-1)) part to DAY(ROWS(A$1:A1))

    Then the formula can be placed anywhere and filled down.

    - Moo
    Last edited by Moo the Dog; 01-15-2013 at 05:07 PM. Reason: Don't need the IFERROR that was originally in the formula

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: automatic change of date according to month

    in the first of month say a1 put
    =EOMONTH(TODAY(),-1)+1
    then in A2 put =IF(ISERROR(A1+1),"",IF(A1+1>EOMONTH(NOW(),0),"",A1+1)) fill that down to row 31
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ 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