+ Reply to Thread
Results 1 to 6 of 6

2 or more Index Match Searches in one?

  1. #1
    Forum Contributor
    Join Date
    12-29-2012
    Location
    usa
    MS-Off Ver
    Excel 2016
    Posts
    325

    2 or more Index Match Searches in one?

    Ok here's my formula:

    =IF(ISERROR(INDEX(OFStats!$O$51:$O$93,MATCH(U6,OFStats!$B$51:$B$93,0))),"",INDEX(OFStats!$O$51:$O$93,MATCH(U6,OFStats!$B$51:$B$93,0)))

    So that takes U6 as a reference and looks through B51:B93 on another sheet for that reference and if it finds that reference, it goes to column O and takes the value from there. Works well.

    However, I want it to search more values.

    For example,
    If the formula doesn't find the reference in B51:B93, then I want it to do the same thing but search cells B1471:B1513 and see if it finds the reference there. And if it does, do the same thing as the formula above, and go to column O and take the value from there.

    Pretty much the same formula, except if it doesnt find the reference in the first lookup section, then it goes to another section.

  2. #2
    Forum Contributor
    Join Date
    12-29-2012
    Location
    usa
    MS-Off Ver
    Excel 2016
    Posts
    325

    Re: 2 or more Index Match Searches in one?

    I'm sure its simple. I did + and the formula again but that adds things up wrong I think?

  3. #3
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: 2 or more Index Match Searches in one?

    nobodyukno,

    Do you have to make it range specific? Using whole columns on a vlookup should accomplish what you're looking for...
    =IF(COUNTIF(OfStats!B:B,U6)>0,VLOOKUP(U6,OfStats!B:O,14,FALSE),"")
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Forum Contributor
    Join Date
    12-29-2012
    Location
    usa
    MS-Off Ver
    Excel 2016
    Posts
    325

    Re: 2 or more Index Match Searches in one?

    Quote Originally Posted by tigeravatar View Post
    nobodyukno,

    Do you have to make it range specific? Using whole columns on a vlookup should accomplish what you're looking for...
    =IF(COUNTIF(OfStats!B:B,U6)>0,VLOOKUP(U6,OfStats!B:O,14,FALSE),"")
    It has to be range specific because the lookup value appears in the same column in other parts of the worksheet

  5. #5
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: 2 or more Index Match Searches in one?

    In that case this should do the trick:
    =IF(COUNTIF(OFStats!$B$51:$B$93,U6)>0,VLOOKUP(U6,OFStats!$B$51:$O$93,14,FALSE),IF(COUNTIF(OFStats!$B$1471:$B$1513,U6)>0,VLOOKUP(U6,OFStats!$B$1471:$O$1513,14,FALSE),""))

  6. #6
    Forum Contributor
    Join Date
    12-29-2012
    Location
    usa
    MS-Off Ver
    Excel 2016
    Posts
    325

    Re: 2 or more Index Match Searches in one?

    Quote Originally Posted by tigeravatar View Post
    In that case this should do the trick:
    =IF(COUNTIF(OFStats!$B$51:$B$93,U6)>0,VLOOKUP(U6,OFStats!$B$51:$O$93,14,FALSE),IF(COUNTIF(OFStats!$B$1471:$B$1513,U6)>0,VLOOKUP(U6,OFStats!$B$1471:$O$1513,14,FALSE),""))
    Works great! Thanks a lot!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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