+ Reply to Thread
Results 1 to 3 of 3

auto fill dates

  1. #1
    Registered User
    Join Date
    12-04-2012
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2003, Excel 2007, Excel 365
    Posts
    55

    auto fill dates

    I want to have colums A2 to A32 filled with dates automatically on selecting month from A1 dropwown(validation list).. can anybody help how can that be done

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,420

    Re: auto fill dates

    What's in the drop down? Month text? Short form? Long form? Month Number? Date?

    Basically, you need to generate a date in cell A2 using what's in A1.
    Then A3 to A32 just add 1 to the previous date. So, A3: =A2+1 and drag down.

    For it to be neat, you should check that the month is the same and, if it's not, make it blank. For example, for February, you'd have 2 or 3 blank cells.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,420

    Re: auto fill dates

    Put this formula in A2:

    =DATEVALUE("01/" & A1 & "/" & TEXT(YEAR(TODAY()),"0000")) and format as a Date.


    It generates a date using the first day of the month and the current year. It will accept and "valid" month or month number. So, for example, you can put 2, feb, febr, febru, ... february, and all will be accepted and generate 01/02/2013.


    Regards, TMS

+ 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