+ Reply to Thread
Results 1 to 6 of 6

Having more than one 'match' in an iferror-index-match formula

  1. #1
    Registered User
    Join Date
    08-06-2016
    Location
    Southampton, England
    MS-Off Ver
    2013
    Posts
    29

    Having more than one 'match' in an iferror-index-match formula

    Hello,

    I'm using the following IFERROR formula for in a spreadsheet:

    =IFERROR(INDEX(AK$5:AO$5,1,MATCH("NIGHT",AK43:AO43,0)),"UNASSIGNED")

    As you can see, the lookup value is "NIGHT". I want to add an additional lookup value: "NIGHT shift swap".

    I've tried:

    =IFERROR(INDEX(AK$5,AO$5,1,MATCH("NIGHT",AK43:AO43,0),MATCH("NIGHT shift swap",AK43:AO43,0)),"UNASSIGNED")

    but it's obviously wrong, as it's not working.

    Grateful if someone could point out my formula error here.

    (PS - I usually attach a spreadsheet, but this one is massive and confidential, so hoping the above explanation is sufficient)

    Thanks in advance!

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Having more than one 'match' in an iferror-index-match formula

    I want to add an additional lookup value: "NIGHT shift swap".
    Does this mean that you want to return two answers from one formula? Or that you want to look for "NIGHT" and it you don't find it, look for "NIGHT shift swap"? What result do you want to see?
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    08-06-2016
    Location
    Southampton, England
    MS-Off Ver
    2013
    Posts
    29

    Re: Having more than one 'match' in an iferror-index-match formula

    Hi Jeff,

    To clarify, I want to look for 'NIGHT' and if not found, look for 'NIGHT shift swap'. And if neither are found, then 'UNASSIGNED' is returned (if either are found, then a person's name designated to a column is returned - that's working fine with the current formula, when 'NIGHT' is found)

    Hope that makes sense!

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Having more than one 'match' in an iferror-index-match formula

    What if MATCH finds both?

    If "NIGHT" is the preferred match perhaps this will do.

    =IFERROR(INDEX(AK$5:AO$5,1,LOOKUP(1E+306,MATCH({"Night shift swap","NIGHT"},AK43:AO43,0))),"UNASSIGNED")
    Last edited by FlameRetired; 02-05-2018 at 10:24 PM.
    Dave

  5. #5
    Registered User
    Join Date
    08-06-2016
    Location
    Southampton, England
    MS-Off Ver
    2013
    Posts
    29

    Re: Having more than one 'match' in an iferror-index-match formula

    Thanks Dave, that's worked! Much appreciated!

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Having more than one 'match' in an iferror-index-match formula

    You're welcome. Thanks for the feedback and marking your thread Solved.

+ 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] Mod to current IFERROR INDEX MATCH Formula
    By hammer2 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-30-2016, 08:00 PM
  2. [SOLVED] IFERROR, INDEX, MATCH... formula... that also reads dates.
    By JasonNeedsHelp in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 07-22-2014, 03:52 PM
  3. Excel Formula: IFERROR, INDEX, SMALL, MATCH
    By Jenn12788 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-12-2014, 10:03 PM
  4. Help to simplify an =IF(IFERROR(INDEX(...,MATCH( formula
    By sa12345 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-11-2014, 03:40 AM
  5. [SOLVED] IFERROR+INDEX+MATCH Formula is not returning the correct value
    By bxk006 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-16-2013, 09:50 AM
  6. Wrong result displaying using IFERROR-INDEX-MATCH-ROW Formula
    By paradise2sr in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-16-2013, 01:03 PM
  7. Looking for better formula of iferror, index and match
    By DavidRoger in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-23-2012, 07:50 AM

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