+ Reply to Thread
Results 1 to 5 of 5

Populate a Row based on a Date Range

  1. #1
    Registered User
    Join Date
    03-14-2019
    Location
    Arizona
    MS-Off Ver
    Excel 2016
    Posts
    3

    Populate a Row based on a Date Range

    I am trying to auto-populate a row based on a provided date range. The data would be pulled from Sheet1. Sheet1 has two rows. Row 1 has numbers in each cell. Row 2 contains a date for each value in row 1. For example, A1 and A2 would be 12763 and 3/22/2019, B1/B2 would be 12653/ 3/22/2019, E1/E2 would be 12760/ 4/5/2019.

    Now in Sheet2, if I were to put in 3/18/2019 in I2 and 4/1/2019 in L2 in row 2 the next row would be populated with all numbers in that date range (in this case the first value in the next row (A3) would be 12763, the next (B3) would be 12653 and would exlcude 12760 as it falls outside the date range.).

    I cannot figure this out. If macros are needed for this please let me know! I'm sorry if I explained this poorly. I attached a workbook with two examples of the end result.

    Thank you.
    Attached Files Attached Files
    Last edited by PLWestern; 03-14-2019 at 05:37 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16
    Posts
    46,522

    Re: Populate a Row based on a Date Range

    Hi, welcome to the forum

    Instead of referring to cell 1 and cell 2, please use "real" cell references - A1 and B1 for instance.
    And, if your sheet2 does not contain that data, please include it, we need to actually "see what you are trying to do, please.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    03-14-2019
    Location
    Arizona
    MS-Off Ver
    Excel 2016
    Posts
    3

    Re: Populate a Row based on a Date Range

    Let me know if there are still issues with my post! I went ahead and made the corrections you requested.

  4. #4
    Forum Contributor
    Join Date
    01-07-2013
    Location
    Michigan
    MS-Off Ver
    O365
    Posts
    164

    Re: Populate a Row based on a Date Range

    Enter this in cell A3 on Sheet2 using ctrl+shift+enter, then drag to M3. You should then be able to copy it to A9 and drag to M9:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-14-2019
    Location
    Arizona
    MS-Off Ver
    Excel 2016
    Posts
    3

    Re: Populate a Row based on a Date Range

    Thank you so much! It works perfectly!

+ 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