+ Reply to Thread
Results 1 to 17 of 17

Using Index Match to match against more than one column, but only reference one row

  1. #1
    Registered User
    Join Date
    06-16-2017
    Location
    USA
    MS-Off Ver
    2016
    Posts
    5

    Using Index Match to match against more than one column, but only reference one row

    This is what I have come up with so far, but it is not working.

    Please Login or Register  to view this content.
    Capture1.JPG

    Capture.JPG

    So basically, I want to be able to match other C or D as they will contain different names, but they will provide the same results.

    And Sorry, first time to this forum, so hopefully I am posting correctly.


    Thank you in advance for any input.

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Using Index Match to match against more than one column, but only reference one row

    Here's one option

    =IFERROR(INDEX(E2:E6,MATCH(A2,C2:C6,0)),INDEX(E2:E6,MATCH(A2,D2:D6,0)))

  3. #3
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Using Index Match to match against more than one column, but only reference one row

    you can try also:
    =IFNA(INDEX($E$2:$E$6,IFNA(MATCH(A2,$C$2:$C$6,0),MATCH(A2,$D$2:$D$6,0))),"")

  4. #4
    Registered User
    Join Date
    06-16-2017
    Location
    USA
    MS-Off Ver
    2016
    Posts
    5

    Re: Using Index Match to match against more than one column, but only reference one row

    Thanks all, I'll give it a shot Monday morning. Going to save me a lot of time sorting through stuff for sure.

  5. #5
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Using Index Match to match against more than one column, but only reference one row

    Happy to help. Let us know how it turns out.

    Welcome to the forum.

    Just came to the realization that I am spending my Friday night on the Excel forum...

  6. #6
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Using Index Match to match against more than one column, but only reference one row

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

  7. #7
    Registered User
    Join Date
    06-16-2017
    Location
    USA
    MS-Off Ver
    2016
    Posts
    5

    Re: Using Index Match to match against more than one column, but only reference one row

    Will do. Is it ok to wait until Monday? Just incase I have further questions?

  8. #8
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Using Index Match to match against more than one column, but only reference one row

    You can mark thread unsolved and ask question

    Basic rule is: one problem - one thread
    Last edited by sandy666; 06-16-2017 at 08:57 PM.

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

    Re: Using Index Match to match against more than one column, but only reference one row

    Late comer / afterthought.

    Array entered. If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.
    Formula: copy to clipboard
    Please Login or Register  to view this content.



    A
    B
    C
    D
    E
    1
    Lookup
    Result
    Lookup
    Table
    Result Table
    2
    8
    red
    1
    6
    blue
    3
    2
    7
    green
    4
    3
    8
    red
    5
    4
    9
    pink
    6
    5
    10
    black
    Dave

  10. #10
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Using Index Match to match against more than one column, but only reference one row

    Dave,
    You forgot about $$

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

    Re: Using Index Match to match against more than one column, but only reference one row

    Yup! I started to type, "We get paid?" LOL Good catch! Got in a hurry ... weekend.

    Here it is.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  12. #12
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Using Index Match to match against more than one column, but only reference one row

    Quote Originally Posted by FlameRetired View Post
    "We get paid?" LOL
    It would be fine

  13. #13
    Registered User
    Join Date
    06-16-2017
    Location
    USA
    MS-Off Ver
    2016
    Posts
    5

    Re: Using Index Match to match against more than one column, but only reference one row

    Quote Originally Posted by FlameRetired View Post

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Thanks for this FlameRetired, this actually worked great as I actually needed to match more than 2 columns. If you have a couple of minutes, I was hoping you can explain to me why "1/(" part of the equation.

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

    Re: Using Index Match to match against more than one column, but only reference one row

    It returns an array of 1(s) and #DIV/0 errors. MATCH ignores errors in its second argument and returns the row number of the first 1 it finds.

    I do that partly out of habit. MATCH(1,--((A2=$C$2:$C$6)+(A2=$D$2:$D$6)),0) (array of 1s and 0s) often works as well, but I find that occasionally I get #N/A returns with that.

    It happens rarely and usually when the operation is * and not +. Strangely when it does happen the 1 in the array to be matched is always in the 1st row of the array. I have never understood this, but reciprocating the array remedies it.

    The main thing is that you are trying to match the first 1 in the array.

    Does this help?

  15. #15
    Registered User
    Join Date
    06-16-2017
    Location
    USA
    MS-Off Ver
    2016
    Posts
    5

    Re: Using Index Match to match against more than one column, but only reference one row

    YES!! Great explanation. Much appreciated!

  16. #16
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Using Index Match to match against more than one column, but only reference one row

    Or this
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v A B C D E
    1 Lookup Result Lookup Table Result Table
    2 8 red 1 6 blue
    3 7 green 2 7 green
    4 10 black 3 8 red
    5 6 blue 4 9 pink
    6 9 pink 5 10 black
    Last edited by AlKey; 06-19-2017 at 11:42 AM.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

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

    Re: Using Index Match to match against more than one column, but only reference one row

    Yes. I forget about good old reliable LOOKUP. Fewer function calls.

+ 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. Replies: 4
    Last Post: 04-14-2017, 07:47 PM
  2. [SOLVED] Index match match with the column number determined by two rows???
    By bridge4444 in forum Excel General
    Replies: 2
    Last Post: 08-08-2016, 04:23 AM
  3. Replies: 9
    Last Post: 04-12-2015, 07:20 PM
  4. Replies: 4
    Last Post: 01-13-2014, 04:16 AM
  5. Replies: 6
    Last Post: 11-08-2013, 10:29 PM
  6. Utilizing INDEX/MATCH to match variables by column only
    By jeffreybrown in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 12-29-2011, 09:53 AM
  7. match value in one column to adjacent value: use vlookup or index/match?
    By conorsgaffney in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-28-2010, 04:59 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