Results 1 to 6 of 6

Take user input start date and end date. Create a column for each month between these

Threaded View

  1. #1
    Registered User
    Join Date
    04-30-2010
    Location
    Wales, Boyo
    MS-Off Ver
    Excel 2007
    Posts
    42

    Take user input start date and end date. Create a column for each month between these

    Ok, So I have a worksheet where the user inputs a start date in cell a2 and an end date in cell b2

    I need to work out the months this covers. So for example 01/01/2010 - 31/12/2010 and then put a column heading in for each month starting in B4 and going across that row for however many columns i need.

    So in this case I would have Jan-2010 in B4, Feb-2010 in C4 and so on up until Dec 2010 in the last column.

    Can anyone give me pointers on how to do this in VBA. I also need to be able to use the calculated months in sql queries so it would be good if I could have another row below the headings with the date range in date format So b4 would be Jan-2010. b5 would be 01/01/2010 - 31/01/2010.

    Any help would be greatly appreciated

    Thanks
    Last edited by TheCyrusVirus; 05-07-2010 at 11:45 AM. Reason: solved

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