+ Reply to Thread
Results 1 to 9 of 9

INDEX MATCH for multiple criteria

  1. #1
    Registered User
    Join Date
    06-13-2019
    Location
    Utah, United States
    MS-Off Ver
    MS 2016
    Posts
    9

    INDEX MATCH for multiple criteria

    I have a data set where each row represents a sale made by an agent. The columns consist of dates as well as an answer to a question (yes, no, N/A).

    I would like to write a formula that yields EVERY agent who answered "no" to the question between two dates. Is this possible?

    In my formula, Sheet1!B:B is the column containing the names of the agents. This is the column from which I would like the return value to come.
    Sheet1!E:E is the column that contains the dates.
    Sheet1!N:N is the column that contains the "No" N2 that I want to match
    B2 is the start date
    B3 is the end date

    I have tried this formula but only yield one result of an error... Please advise

    =ArrayFormula(INDEX(Sheet1!B:B, MATCH(1(Sheet1!$N$2=Sheet1!N:N)*($B$2>=Sheet1!$E:$E)*($B$3<=Sheet1!$E:$E,2)))

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,610

    Re: INDEX MATCH for multiple criteria

    ArrayFormula is a Googlesheet function, right?

  3. #3
    Registered User
    Join Date
    06-13-2019
    Location
    Utah, United States
    MS-Off Ver
    MS 2016
    Posts
    9

    Re: INDEX MATCH for multiple criteria

    You are correct, but I am using excel and just wanted to imply that I was using an array formula. My apologies for the misdirection.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: INDEX MATCH for multiple criteria

    Try:

    INDEX(Sheet1!B:B, MATCH(1,(Sheet1!$N$2=Sheet1!N:N)*($B$2>=Sheet1!$E:$E)*($B$3<=Sheet1!$E:$E,2))

    If that doesn't work, please attach a sample sheet. Also, not a good idea to use whole column references in array formulae. they can get sooo slow.Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? However, please give us an indication of the approximate number of rows of data you want the solution to work with (100, 1000, 100,000 or whatever). Please don't attach a picture of an Excel sheet (no-one will want to re-type all your stuff before starting).

    1. It does NOT have to be your real sheet - mock up a SAMPLE if you need to. But not 1000's of rows!!! It makes manual checking so tedious. Whatever you do... make sure that all confidential information is removed first!!

    2. Make sure that your sample data are truly REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    3. Make sure that your desired solution is also shown (mock up the results manually).

    4. Try to avoid using merged cells. They cause lots of problems!

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  5. #5
    Registered User
    Join Date
    06-13-2019
    Location
    Utah, United States
    MS-Off Ver
    MS 2016
    Posts
    9

    Re: INDEX MATCH for multiple criteria

    I have attached a representation of my data in an excel sheet.


    My goal is to yield a list of every agent (from column B) who "failed" the question (column N) between two dates.

    I did try the suggested formula INDEX(Sheet1!B:B, MATCH(1,(Sheet1!$N$2=Sheet1!N:N)*($B$2>=Sheet1!$E:$E)*($B$3<=Sheet1!$E:$E,2)) but it returned an error.

    Ideally, I would like to use the entire row. I could split it up into months but then I wouldn't be able to choose an exact date range...
    Attached Files Attached Files

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: INDEX MATCH for multiple criteria

    I changed a few dates (in yellow). An ordinary formula:

    =IFERROR(INDEX(B:B,AGGREGATE(15,6,ROW($B$2:$B$100)/(($N$2:$N$100="no (auto-Fail)")*($E$2:$E$100>=$P$2)*($E$2:$E$100<=$Q$2)),ROWS(R$2:R2))),"")

    see sheet
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    06-13-2019
    Location
    Utah, United States
    MS-Off Ver
    MS 2016
    Posts
    9

    Re: INDEX MATCH for multiple criteria

    Success!!! Thank you!

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: INDEX MATCH for multiple criteria

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

  9. #9
    Registered User
    Join Date
    06-13-2019
    Location
    Utah, United States
    MS-Off Ver
    MS 2016
    Posts
    9

    Re: INDEX MATCH for multiple criteria

    Must this all be on the same sheet? When I kept the data set on one sheet and added the date range and formula on a second, the result were blank cells.
    Last edited by treegee; 06-24-2019 at 01:24 PM.

+ 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] Index Match with multiple criteria and date criteria
    By snolem75 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-28-2018, 03:51 PM
  2. Replies: 16
    Last Post: 01-05-2018, 11:04 PM
  3. Need help in Index, Match usage to match multiple criteria in sum function
    By Summer0830 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-26-2017, 02:47 AM
  4. Index/Match to Match entries on multiple criteria
    By manning457 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-06-2015, 02:32 PM
  5. [SOLVED] INDEX/MATCH with Multiple MATCH criteria ?
    By KomicJ in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-17-2015, 09:04 AM
  6. [SOLVED] Index Match with Multiple Criteria Using Same Criteria Column
    By rominjn in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-05-2015, 11:34 AM
  7. Replies: 2
    Last Post: 09-27-2014, 04:34 PM

Tags for this Thread

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