+ Reply to Thread
Results 1 to 13 of 13

Date range to return certain rows from data stored on separate sheet of workbook

  1. #1
    Registered User
    Join Date
    08-20-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    20

    Date range to return certain rows from data stored on separate sheet of workbook

    I am SO bad at wording these.

    My example will probably show it best.

    Basically I want to enter a date in G1 and a date in H1 and have any data from a second sheet, in column A that falls within that range to return that whole row.

    Does that even make sense?

    Sorry.
    Attached Files Attached Files

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,973

    Re: Date range to return certain rows from data stored on separate sheet of workbook

    I think you have date range wrong? I believe you meant 1/1/2017 - 3/31/2017 from your sample data.

    Formula method:
    In F8:
    =INDEX(Data!$A$5:$A$38,SMALL(IF((Data!$A$5:$A$38>=$G$1)*(Data!$A$5:$A$38<=$H$1),ROW($A$5:$A$38)-4),ROW(A1)))
    Confirmed as array (CTRL + SHIFT + ENTER). Then copied down.

    In G8:
    =INDEX(Data!B$5:B$38,MATCH($F8,Data!$A$5:$A$38,0))

    Copy across and down.

    But, this sort of operation is best done via Advanced Filter with small bit of VBA.
    Please Login or Register  to view this content.
    Where A2 contains start date & B2 contains end date. But criteria range is R1:S2.

    See attached (AdvFilter sheet) and link below for more on advanced filter.
    http://www.contextures.com/xladvfilter01.html
    Attached Files Attached Files

  3. #3
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Date range to return certain rows from data stored on separate sheet of workbook

    Try this

    In I1 and J1 (main sheet) use the following auxiliar formulas

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    In F8 use the following formula and copy down and right (to keep formats use paste special formulas)

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    See the file
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    08-20-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Date range to return certain rows from data stored on separate sheet of workbook

    I do have the date wrong. I meant EXACTLY what you said.

    Lemme try to play with it. Let me take the company identifying info (they would skin me if they saw their logo on a forum) and use the actual sheet I will be working with and use the formulas and paste what I come up with. GOSH you guys are BRILLIANT!

  5. #5
    Registered User
    Join Date
    08-20-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Date range to return certain rows from data stored on separate sheet of workbook

    OMG I have so much data I started getting lost.

    This is the actual sheet. The blank sheet on the first page that needs to have the stuff put into it.

    This probably will make it a lot easier. LOL
    Attached Files Attached Files

  6. #6
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Date range to return certain rows from data stored on separate sheet of workbook

    Hi
    Formulas are the same, adjust only the ranges

    See the file
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    08-20-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Date range to return certain rows from data stored on separate sheet of workbook

    Forum expert under your name would be correct. Thank you so much for this!!!


    What would I research to see how you came up with this so I can one day (maybe) learn how to do this on my own?

  8. #8
    Registered User
    Join Date
    08-20-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Date range to return certain rows from data stored on separate sheet of workbook

    Here I am again. This is an old chart you guys helped me with. I am having trouble converting it to 2018. When I plug in fake data for 2018 on the data tab and type the dates in the upper right corner of the FULL YEAR CALENDAR tab, it does not pull the correct dates like it is supposed to. Can anyone help with this? If you put in the upper right 3/1/2018 to 5/15/2018 you can see what I mean.
    Attached Files Attached Files

  9. #9
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    19,005

    Re: Date range to return certain rows from data stored on separate sheet of workbook

    Try modifying the formula in AL7 (and down) so that it reads as follows:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  10. #10
    Registered User
    Join Date
    08-20-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Date range to return certain rows from data stored on separate sheet of workbook

    My question:

    HOW DO YOU KNOW HOW TO DO THIS????? YES I AM SCREAMING!!!! I am an EXTREMELY intelligent person. (If I say so myself)

    I have NO idea how to follow that formula or how you even knew where to put anything or what to put. Where would I start in learning this?

    You guys are SO brilliant!!!!!

  11. #11
    Forum Contributor
    Join Date
    05-30-2015
    Location
    Dubai
    MS-Off Ver
    Excel 2016 Mac & PC & 365
    Posts
    633

    Re: Date range to return certain rows from data stored on separate sheet of workbook

    I can't figure out what column AK is doing?

  12. #12
    Registered User
    Join Date
    08-20-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    20

    Wink Re: Date range to return certain rows from data stored on separate sheet of workbook

    What Jett advised to do worked perfectly.
    I started the formula with a =IF('ScheduleData'A$2="","",then inserted his formula. Then I drug it across and down. Perfecto.

    I just wish I knew how to do any of this. I get excited if I get a VLookup formula to work on the first try.


  13. #13
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    19,005

    Re: Date range to return certain rows from data stored on separate sheet of workbook

    It was a big help that I was starting with the formula José had written already in front of me, even then I certainly did not get the formula to work on the first try. I made use of the 'Evaluate Formula' feature to figure out the bugs in the first few iterations of the formula, and encourage you to use that feature as good way to learn how the formula works. Of course let us know if you have any questions.
    That said, I am glad that you have a solution that works. Please take a moment to mark the thread as 'Solved' using the thread tools link above your first post. I hope that you have a blessed day.

+ 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. [SOLVED] Remove specific text rows and move to a separate sheet in a workbook
    By leebird in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-27-2015, 07:27 AM
  2. Copy rows of data that meet date range criteria to new sheet
    By natik in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-16-2015, 09:58 PM
  3. Return multiline textbox data to separate rows
    By buhwheet in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-24-2015, 03:59 PM
  4. [SOLVED] Excel2010 IF Formula to return value based on a separate date and two separate text values
    By jakecutler in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-12-2015, 03:24 AM
  5. Move rows with certain value to separate sheet within the workbook
    By KateM in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-27-2013, 01:14 PM
  6. [SOLVED] Search date range 7/1/2012 - 7/31/2012 and return the results in a new workbook/sheet
    By MelHerndon in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-20-2012, 01:13 PM
  7. Replies: 27
    Last Post: 08-17-2011, 05:25 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