+ Reply to Thread
Results 1 to 4 of 4

Retrun all rows from a table if criteria is met

  1. #1
    Registered User
    Join Date
    10-08-2013
    Location
    UK
    MS-Off Ver
    Excel 2013
    Posts
    26

    Retrun all rows from a table if criteria is met

    I am keeping a company forecasting spreadsheet and regularly need to extract information from the data based on certain criteria.

    For example I want to find all Expenses that occurred in January 2015. Therefore exclude all other month's. Any expense that has an end date before Jan 2015 or has a start date after Jan 2015 would be excluded. At the moment I am able to do this using the filters which is perfect but time consuming. Would it be possible to create another page on the workbook where all entries are returned if certain criteria is met?

    What would be the quickest way of extracting information from the spreadsheet? See the spreadsheet attached.
    Attached Files Attached Files
    Last edited by Chris.Williams81; 10-08-2015 at 07:24 AM.

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Retrun all rows from a table if criteria is met

    Enter this formula on Sheet2 in cell B2. Pull formula to the right and then down. Format columns E and F as Date.

    =IFERROR(INDEX(Sheet1!B:B,AGGREGATE(15,6,ROW(Sheet1!$C$2:$C$4045)/((Sheet1!$C$2:$C$4045=$K$3)*(Sheet1!$E$2:$E$4045>=$K$4)*(Sheet1!$E$2:$E$4045<=$K$5)),ROWS(B$2:B2))),"")
    Attached Files Attached Files
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Retrun all rows from a table if criteria is met

    Hi,

    in B2 to be copied across


    =iferror(index(Sheet1!B$2:B$4045,aggregate(15,6,row($2:$4045)-1/((Sheet1!$C$2:$C$4045=$K$3)*(Sheet1!$E$2:$E$4045>=$K$4)*(Sheet1!$F$2:$F$4045<=$K$5)),rows($A$1:$A1))),"")


    -------------------------------


    edit: excuse me Alkey, I did not mean to overlap: same approach.
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  4. #4
    Registered User
    Join Date
    10-08-2013
    Location
    UK
    MS-Off Ver
    Excel 2013
    Posts
    26

    Re: Retrun all rows from a table if criteria is met

    Perfect, thank you

+ 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] hide rows, based criteria table
    By elsg in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-03-2014, 05:35 PM
  2. Move rows in a table based upon a certain criteria.
    By Sm1tty in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-05-2014, 04:48 PM
  3. Replies: 2
    Last Post: 04-16-2013, 06:17 AM
  4. Replies: 1
    Last Post: 12-03-2012, 08:14 AM
  5. [SOLVED] Using dynmanic range names to retrun intersect on a table
    By bobslay71 in forum Excel General
    Replies: 3
    Last Post: 06-07-2012, 06:21 AM
  6. Replies: 3
    Last Post: 09-09-2011, 08:24 AM
  7. [SOLVED] Returning all rows from table that match certain criteria
    By carbonn in forum Excel General
    Replies: 6
    Last Post: 11-11-2009, 07:42 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