+ Reply to Thread
Results 1 to 5 of 5

Create series of dates from user input

  1. #1
    Registered User
    Join Date
    08-28-2012
    Location
    London
    MS-Off Ver
    Excel 2011
    Posts
    3

    Post Create series of dates from user input

    Hi All,

    I'm new here, so thanks in advance for the help. Going to try to keep it simple as am sure it is a very simple answer!

    I have two sheets one called "Dates and Codes" the other "Ordering"
    In the Dates and Codes Sheet I want the user to input a start date (H4) in one cell and an end date in another(H6); the date format being UK style eg 24/09/2012
    In the Ordering sheet based on this input I want all weekdays between these two inputted dates generated and displayed on one row (to become a title heading) beginning in C4 (then D4, E4,etc to the end date)
    The created dates in the Ordering Sheet need to include those dates input in the Dates and Codes sheet, i.e it is a fully inclusive series.

    Would love some help as I'm going crazy trying to create this.

    Thanks again,

    Ian

  2. #2
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,715

    Re: Create series of dates from user input

    Hi try this macro
    it starts typing the dates from cell C4 in the "Ordering" sheet - change the DestCell if you want to start in a different cell
    it assumes Mon-Fri as your working week, and doesn't pick up public holidays

    Please Login or Register  to view this content.
    Last edited by NickyC; 08-28-2012 at 04:27 AM.

  3. #3
    Registered User
    Join Date
    08-28-2012
    Location
    London
    MS-Off Ver
    Excel 2011
    Posts
    3

    Re: Create series of dates from user input

    You absolute star and angel, that has worked perfectly!!

    I promise to do two nice things for other people today!

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

    Re: Create series of dates from user input

    put anywhere and dragged across this formula will create a consecutive inclusive list where Sheet1!$B$2 is end date Sheet1!$A$2 is start date
    =IF(COLUMN(A1)-1>Sheet1!$B$2-Sheet1!$A$2,"",Sheet1!$A$2+COLUMN(A1)-1)
    "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

  5. #5
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Create series of dates from user input

    @ idorward

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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