+ Reply to Thread
Results 1 to 12 of 12

Match/Index Multiple Columns

  1. #1
    Valued Forum Contributor fredlo2010's Avatar
    Join Date
    07-04-2012
    Location
    Miami, United States
    MS-Off Ver
    Excel 365
    Posts
    762

    Match/Index Multiple Columns

    Hello,

    I am trying to create a formula to match different items from different columns.

    So I want to be able to put data in G and the columns H:L will contain the formula to look up the values. The values in G can come from any of the columns. I have been doing some research online and I cannot figure this out. I am almost sure it can be done with an array formula.

    See attached sample.

    Formula.xlsx

    Thanks a lot in advance

  2. #2
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Match/Index Multiple Columns

    I'm not sure what "value" you want to show, but if you're just trying to find out if the ID is in the particular column, then use COUNTIF. For example, in cell H2, use:

    Please Login or Register  to view this content.
    Copy/Autofill across and down.

    Cheers,
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  3. #3
    Valued Forum Contributor fredlo2010's Avatar
    Join Date
    07-04-2012
    Location
    Miami, United States
    MS-Off Ver
    Excel 365
    Posts
    762

    Re: Match/Index Multiple Columns

    Thanks a for the response ConnexionLost,

    But I need to bring in the data.

    I have created a formula for it but its super long. and on top of that I am repeating it to get rid of the zeros when there is not a match.

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



    and this the desired output.

    Formula.xlsx

    Thanks a lot.

  4. #4
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Match/Index Multiple Columns

    How about this array formula:

    Please Login or Register  to view this content.
    Confirm as an array formula with Ctrl-Shift-Enter

    Cheers,

  5. #5
    Valued Forum Contributor fredlo2010's Avatar
    Join Date
    07-04-2012
    Location
    Miami, United States
    MS-Off Ver
    Excel 365
    Posts
    762

    Re: Match/Index Multiple Columns

    Hi,

    This works perfectly. Do you mind explaining how you did it. Just the main idea.

    Thanks

  6. #6
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Match/Index Multiple Columns

    Since you were bringing back all the info from the relevant row in the source table, you just needed an INDEX function that knew which row to get. I used an array --($G2=$A$2:$E$21)*(ROW($A$2:$A$21)-1) to identify the necessary row, summing it to get the single number for the INDEX function.

  7. #7
    Valued Forum Contributor fredlo2010's Avatar
    Join Date
    07-04-2012
    Location
    Miami, United States
    MS-Off Ver
    Excel 365
    Posts
    762

    Re: Match/Index Multiple Columns

    Thanks,

    Do you know if there is a row max for this. I tried it with my real data and its not working now

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


    I am getting a #Name? error

    Sorry about that

  8. #8
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Match/Index Multiple Columns

    I haven't used Excel 365 before, but in the normal Excel 2010 version, it shouldn't be a problem.

  9. #9
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Match/Index Multiple Columns

    I don't see anything wrong with the formula you entered. Assuming you did Ctrl-Shift-Enter.

  10. #10
    Valued Forum Contributor fredlo2010's Avatar
    Join Date
    07-04-2012
    Location
    Miami, United States
    MS-Off Ver
    Excel 365
    Posts
    762

    Re: Match/Index Multiple Columns

    Thanks ConneXion,

    The problem for the error is that there was an error in the resource sheet so the error was carried over.

    Now for some reason the data seems to be repeated sometimes on the top. This is happening when its not finding an ID which can also happen.

    Thanks

  11. #11
    Registered User
    Join Date
    02-15-2018
    Location
    INDIA
    MS-Off Ver
    2016
    Posts
    10

    Re: Match/Index Multiple Columns

    Hi ConnexionLost,

    Can you please give solution to my thread https://www.excelforum.com/excel-gen...ml#post4844044.

    Thanks,
    Naveen.

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Match/Index Multiple Columns

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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 across multiple columns
    By Chad B in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-05-2013, 11:52 AM
  2. [SOLVED] Index Match multiple columns
    By Bravo33 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-07-2013, 10:42 AM
  3. Index Match Across Multiple Columns
    By FFastZB in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-20-2013, 04:58 PM
  4. [SOLVED] Index/Match against multiple columns
    By paradox34690 in forum Excel General
    Replies: 8
    Last Post: 04-28-2012, 12:43 PM
  5. Index/Match but with multiple columns?
    By notleonardo in forum Excel General
    Replies: 4
    Last Post: 11-17-2011, 07:16 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