+ Reply to Thread
Results 1 to 6 of 6

Match two criteria and return multiple records

  1. #1
    Registered User
    Join Date
    09-15-2020
    Location
    IL
    MS-Off Ver
    16
    Posts
    14

    Match two criteria and return multiple records

    I am having a problem with returning data that matches two criteria in different columns. I have been playing around with the COUNTIFS,INDEX, and MATCH functions but I cant seem to get it right. I have enclosed an example of what I am looking for.
    Attached Files Attached Files

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,459

    Re: Match two criteria and return multiple records

    Base-To

    =IFERROR(INDEX(A:A,AGGREGATE(15,6,ROW($B$3:$B$15)/(($B$3:$B$15="a1")*($D$3:$D$15="a1")+($B$3:$B$15="a2")*($D$3:$D$15="a2")),ROW(1:1))),"")

    Base-from (Change D to E)

    2 ways to display time : format as time or using MOD function (cell with yellow).
    Attached Files Attached Files
    Quang PT

  3. #3
    Registered User
    Join Date
    09-15-2020
    Location
    IL
    MS-Off Ver
    16
    Posts
    14

    Re: Match two criteria and return multiple records

    Bebo21999,


    Thanks for the help, but I am still running into a problem where not all the data that matches is getting copied over. please see attached file.
    Attached Files Attached Files

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,459

    Re: Match two criteria and return multiple records

    Your current formula:
    =IFERROR(INDEX(A:A,AGGREGATE(15,6,ROW($B$6:$B$500)/(($B$6:$B$500="ORD")*($H$6:$H$500="ORD")),ROW(14:14))),"")
    starts counting from 14th occurence of "ORD"
    try to replace it with ROW(1:1) from first row.

  5. #5
    Registered User
    Join Date
    09-15-2020
    Location
    IL
    MS-Off Ver
    16
    Posts
    14

    Re: Match two criteria and return multiple records

    Bebo2199,

    Thank You, ROW fix and everything seems to to working great. I do have one other issue i am working on. I am trying to count time for specific ranges. the current formula i am using is: =COUNTIFS(range,">="&start time cell,range,"<"&end-time cell), it seems not to calculate the results. once again, i have included an example and thank you in advance for helping me out, much appreciated.
    Attached Files Attached Files

  6. #6
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,459

    Re: Match two criteria and return multiple records

    AL4:

    Please Login or Register  to view this content.
    **Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).

+ 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] Match two criteria and return multiple records - INDEX & AGGREGATE, TEXTJOIN function
    By remyte in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-03-2019, 01:53 PM
  2. [SOLVED] Lookup to match multiple criteria and return multiple results excluding duplicates.
    By kris3012 in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 01-13-2018, 11:06 AM
  3. [SOLVED] Generate List of Records that Match Multiple Criteria from Data Table
    By trandle in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-10-2014, 04:43 PM
  4. Find records that match criteria of multiple fields
    By jvbeats in forum Access Tables & Databases
    Replies: 3
    Last Post: 03-12-2013, 05:40 PM
  5. One criteria - return multiple records
    By gelandl in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-23-2009, 06:10 AM
  6. fimding multiple records that match specific criteria
    By gelandl in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 10-15-2008, 08:37 AM
  7. [SOLVED] return multiple records matching multiple criteria
    By Karthik in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-22-2006, 12:45 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