+ Reply to Thread
Results 1 to 7 of 7

INDEX MATCH with OR multiple criterias

  1. #1
    Forum Contributor
    Join Date
    06-18-2012
    Location
    Kuching, SARAWAK
    MS-Off Ver
    Excel 2010
    Posts
    116

    INDEX MATCH with OR multiple criterias

    Hye there Excel experts,

    I have this formula:-

    =INDEX($H$2:$H$11,MATCH(1,($B4=$B$2:$B$11)*(("New Record"=$D$2:$D$11)+("OSB_USR"=$C$2:$C$11)),0)))

    with Shift+Ctrl+Enter

    My objective is to have the value in columnH IF it matches :-
    a) value in colB AND "New Record" in colD
    OR
    b) value in colB AND "OSB_USR" in colC

    but it seems like when I run the above formula, it returns #N/A. If I breaks them as single pair criterias, it will return me the value I'm expecting, but I need both pair of criterias.
    Can anyone help me to modify the above formula to achieve this objective, please?

    Thanks in advance.

    A learning fella,
    DZ

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: INDEX MATCH with OR multiple criterias

    you can't use logic operator in an array formula as they won't return you an array.
    Try using IF function inside your MATCH one. It should work out perfectly.
    If you still need help, would you please supply us with your workbook so we work on your real structure and data.
    Make sure there are no sensitive data in your file though.
    Regards
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,799

    Re: INDEX MATCH with OR multiple criterias

    Try

    =IFERROR(INDEX($H$2:$H$11,MATCH(1,($B4=$B$2:$B$11)*("New Record"=$D$2:$D$11),0)),INDEX($H$2:$H$11,MATCH(1,($B4=$B$2:$B$11)*("OSB_USR"=$C$2:$C$11),0)))


    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

    You will get N/A (with your formula) if both C and D contain the specified criteria in the same row.

  4. #4
    Forum Contributor
    Join Date
    06-18-2012
    Location
    Kuching, SARAWAK
    MS-Off Ver
    Excel 2010
    Posts
    116

    Re: INDEX MATCH with OR multiple criterias

    Quote Originally Posted by JohnTopley View Post
    Try

    =IFERROR(INDEX($H$2:$H$11,MATCH(1,($B4=$B$2:$B$11)*("New Record"=$D$2:$D$11),0)),INDEX($H$2:$H$11,MATCH(1,($B4=$B$2:$B$11)*("OSB_USR"=$C$2:$C$11),0)))


    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

    You will get N/A (with your formula) if both C and D contain the specified criteria in the same row.
    Thanks for the suggested formula, JohnTopley. However, I tried it already and unfortunately, it returned me more errors than previously.

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,799

    Re: INDEX MATCH with OR multiple criterias

    Worked OK for me.

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  6. #6
    Forum Contributor
    Join Date
    06-18-2012
    Location
    Kuching, SARAWAK
    MS-Off Ver
    Excel 2010
    Posts
    116

    Re: INDEX MATCH with OR multiple criterias

    Hi p24leclerc / JohnTopley ,

    After considering what p24leclerc mentioned and trying to modify the formula given by JohnTopley earlier, I managed to get this formula :-

    =IF($S82="","",IFERROR(INDEX($H$2:$H$630,MATCH(1,($B82=$B$2:$B$630)*("New Record"=$D$2:$D$630),0)),INDEX($H$2:$H$630,MATCH(1,($B82=$B$2:$B$630)*("OSB_USR"=$C$2:$C$630)*("Unassigned"=$G$2:$G$630),0))))

    It works! Finally... Thanks guys. Really appreciate the help.

    DZ

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,799

    Re: INDEX MATCH with OR multiple criterias

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

+ 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. Horizontal Index Match (Hlookup multiple criterias)
    By eyeope in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-05-2017, 05:13 AM
  2. [SOLVED] Index match multiple criterias
    By salimnore in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-27-2015, 07:24 PM
  3. [SOLVED] Index-Match-(or Vlookup) for Multiple criterias.
    By Anatawan in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-10-2014, 02:38 AM
  4. [SOLVED] Index match with many criterias- really need help
    By duonghientan in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-22-2014, 04:45 AM
  5. [SOLVED] INDEX & MATCH w multiple criterias?
    By Eemmai in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-24-2012, 05:20 AM
  6. INDEX & MATCH, 3 criterias, multiple sheets
    By Jaakkolo in forum Excel General
    Replies: 15
    Last Post: 07-04-2012, 02:16 AM
  7. index match based on multiple criterias
    By jw01 in forum Excel General
    Replies: 4
    Last Post: 09-13-2011, 02:21 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