+ Reply to Thread
Results 1 to 5 of 5

How can I fill a column with dates just knowing beginning and ending month ?

  1. #1
    Valued Forum Contributor
    Join Date
    02-21-2010
    Location
    Gotemba, Shizuoka, Japan
    MS-Off Ver
    Excel 2007
    Posts
    499

    How can I fill a column with dates just knowing beginning and ending month ?

    I need to fill a column with dates using a VBA. I need a VBA because this will be part of a larger script.
    Assume you know two variables. The first determining the beginning month and the second determining the ending month.
    E.g.
    BeginningMonth = 5
    EndingMonth = 7

    Now I want to fill a column, lets say column A starting from row 1. I want to fill from the first day in May until the last day in July.
    How can I do that?

  2. #2
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: How can I fill a column with dates just knowing beginning and ending month ?

    Perhaps something like this?

    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,637

    Re: How can I fill a column with dates just knowing beginning and ending month ?

    Please Login or Register  to view this content.
    not sure how you getting the two variables but in this example
    i used c1 as beginning and c2 as ending
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    4,866

    Re: How can I fill a column with dates just knowing beginning and ending month ?

    And another possibility.
    You could try this on a copy of your workbook.

    Cell A1 is the first date
    Cell A2 is the end date
    Column B will have the dates incremented by 1

    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor
    Join Date
    02-21-2010
    Location
    Gotemba, Shizuoka, Japan
    MS-Off Ver
    Excel 2007
    Posts
    499

    Re: How can I fill a column with dates just knowing beginning and ending month ?

    quekbc, thank you very much. That's exactly what I was looking for. Wonderful!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. starting and ending month to fill same qty inbetween months
    By cpramesh in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-09-2014, 03:20 AM
  2. [SOLVED] Help creating a date range with beginning and ending days of the month.
    By charlesbb88 in forum Excel General
    Replies: 6
    Last Post: 04-27-2012, 09:28 PM
  3. Display dates between a beginning date and an ending date
    By krwi in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 02-15-2012, 06:54 PM
  4. Replies: 2
    Last Post: 01-11-2011, 09:30 AM
  5. Replies: 1
    Last Post: 05-27-2010, 12:32 PM
  6. Replies: 5
    Last Post: 05-17-2005, 10:06 AM
  7. [SOLVED] Fill column with dates of month depending on month in A1
    By jashburn13@charter.net in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-10-2005, 09:06 PM

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