+ Reply to Thread
Results 1 to 7 of 7

Separating Rows by Date Range

  1. #1
    Registered User
    Join Date
    05-11-2009
    Location
    GA
    MS-Off Ver
    Excel 2003
    Posts
    14

    Separating Rows by Date Range

    I need to separate out some rows by date into new worksheets, but I need the dates to be a range. Our cycles are separated into periods, which last about 1 month, so I need one new worksheet for each period. I was thinking about having like a cover sheet that defines the exact dates (like column A has the period title "P1, P2, P3,..." and column B has the start date and column C has the end date). Then on the next sheet is where I would keep my Input data. So I need to separate the rows of the input data sheet out by the periods. The date for each data entry is kept in column M. I have attached a sample workbook explaining what I tried to describe above.

    I would like a code that can split this up. Thanks.
    Attached Files Attached Files
    Last edited by cwalker6; 05-20-2009 at 04:50 PM.

  2. #2
    Registered User
    Join Date
    03-17-2009
    Location
    Houston, TX
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    10

    Re: Separating Rows by Date Range

    I have a macro that breaks out data onto separate sheets based on what is in column A and the original sheet is titles "ALL"

    Please Login or Register  to view this content.

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Separating Rows by Date Range

    This macro will run on your example sheet and create the period sheets if they do not exist.
    Please Login or Register  to view this content.
    If the P1, P2, etc sheets already exist, this macro will REPLACE the data that's on those sheets with the new data. If what you want is for the data to APPEND to the bottom, let me know.
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Registered User
    Join Date
    05-11-2009
    Location
    GA
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Separating Rows by Date Range

    Thank you so much for the reply. The code is not capturing the data. There are whole periods that data exists for, but are not being filtered for some reason. I need it to replace each time it runs, so thank you!

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Separating Rows by Date Range

    In the sample data or on something else you're running? This macro does REPLACE, so that's good to go.

  6. #6
    Registered User
    Join Date
    05-11-2009
    Location
    GA
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Separating Rows by Date Range

    On the sample data. P5, P6, and P10 are all blank when they should have data in them.

  7. #7
    Registered User
    Join Date
    05-11-2009
    Location
    GA
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Separating Rows by Date Range

    Thanks for the help.

+ 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