+ Reply to Thread
Results 1 to 17 of 17

Using Match/Index to bring multiple values

  1. #1
    Registered User
    Join Date
    12-24-2014
    Location
    Buenos Aires
    MS-Off Ver
    2013
    Posts
    6

    Using Match/Index to bring multiple values

    Hi,
    I'm using the Match/Index formulas to bring values from another sheet. I need to bring many values in the same row (different columns) and the only way I found until now is to index as many times as I need in different cells, which is quite complicated if there's too many columns (I need 15 values from different columns in the same row).

    Is there any way I can create some sort of array, list or something like it to bring all the values all together in one cell?

    Thank you!
    Regards!

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,023

    Re: Using Match/Index to bring multiple values

    All sorts of ways to do this. but no-one can help you unless you provide us with something to work with. Please attach a sample sheet (NOT a screenshot), minus confidential information.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    12-24-2014
    Location
    Buenos Aires
    MS-Off Ver
    2013
    Posts
    6

    Re: Using Match/Index to bring multiple values

    Attached you'll find 2 files. One with the list of items, the other with a code example I'm using.
    The user types a Part Number, and the sheet finds the information in the list provided. What I would like, instead of typing the match/index formula in each column, is find the way to bring all the row information to one cell.

    Thank you!
    Attached Files Attached Files

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,023

    Re: Using Match/Index to bring multiple values

    Is this what you meant? Drag right as far as you need...
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    12-24-2014
    Location
    Buenos Aires
    MS-Off Ver
    2013
    Posts
    6

    Re: Using Match/Index to bring multiple values

    But I don't wont them in different columns, I want all the columns in some sort of array or separated by commas in with cell

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,023

    Re: Using Match/Index to bring multiple values

    Misread your request.... I'll have a think.

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Using Match/Index to bring multiple values

    There's a good concatenation UDF here:

    https://www.excelforum.com/showthread.php?p=3096647
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  8. #8
    Registered User
    Join Date
    12-24-2014
    Location
    Buenos Aires
    MS-Off Ver
    2013
    Posts
    6

    Re: Using Match/Index to bring multiple values

    Quite interesting, thanks for the reference. The UDF will be useful if I had all the columns and needed to concatenate them, is there any way I can get the match/index (or the vlookup) function to return an array? Otherwise, I should put everything in different columns and then use the function (I would be still be using lots of columns to then concatenate them).
    Thank you!

  9. #9
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Using Match/Index to bring multiple values

    I didn't download your files. I have a download size restriction.

    I'm not sure if you're looking for something like this.

    Data Range
    A
    B
    C
    D
    E
    F
    1
    ----------
    ----------
    ----------
    ----------
    ----------
    ----------
    2
    G
    1
    2
    3
    4
    5
    3
    A
    11
    12
    13
    14
    15
    4
    C
    21
    22
    23
    24
    25
    5
    6
    7
    A
    12, 13, 15


    We want to concatenate the entries from columns 2, 3 and 5 on the row that matches "A".

    Using the concatall UDF...

    Array entered**:

    =concatall(INDEX(B2:F4,MATCH(A7,A2:A4,0),N(IF(1,{2,3,5}))),", ")

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    If what you want is any more complicated than this then you're probably going to have to get someone to write a new UDF that is specific to your needs.

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,023

    Re: Using Match/Index to bring multiple values

    I doubt if tis will take you much further on... but you never know.
    Attached Files Attached Files

  11. #11
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Using Match/Index to bring multiple values

    Have a look at the Post #8 in the following thread:-
    http://www.excelforum.com/excel-form...e-formula.html
    Regards,
    Vikas Gautam
    Excel-buzz.blogspot.com

    Excel is not a matter of Experience, its a matter of Application.

    Say Thanks, Click * Add Reputation

  12. #12
    Registered User
    Join Date
    12-24-2014
    Location
    Buenos Aires
    MS-Off Ver
    2013
    Posts
    6

    Re: Using Match/Index to bring multiple values

    This one worked quite well.
    "=concatall(INDEX(B2:F4,MATCH(A7,A2:A4,0),N(IF(1,{2,3,5}))),", ")"

    I tried the same solution without the N formula, but didn't work, can you tell me what is the N formula doing?

    Thank you!

  13. #13
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Using Match/Index to bring multiple values

    In simple words as I think,
    N(Array) is forcing Index Function to take its Column Argument as Array,
    which means Index Function will return an array of values against what it usually does ie. returning a single value.

    But I want to request Mr. Tony to have their say so that we can learn more of it.

  14. #14
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Using Match/Index to bring multiple values

    Yes, that's what's happening.

  15. #15
    Registered User
    Join Date
    12-24-2014
    Location
    Buenos Aires
    MS-Off Ver
    2013
    Posts
    6

    Re: Using Match/Index to bring multiple values

    Great then, the workaround is working perfectly (I brought 10 columns and have them in a comma separated cell). Thank you!

    Two questions to follow up:

    1) I'm using references to an external and quite big sheet (the price list). Is it normal that the size of my sheet (where I used the concatall) has increased to the same size as the price list? Is there anything I can do about it?

    2) I also tried to build a UDF that sums all up, including the index/match, but doesn't work, probably because I'm using it wrong. Can you call excel functions from vba? is there a better way to access to price list from vba?

    Thank you all for your help!

  16. #16
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Using Match/Index to bring multiple values

    Sorry, I'm not much of a programmer.

    Maybe try posting the question in the Excel Programming / VBA / Macros forum.

  17. #17
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Using Match/Index to bring multiple values

    For Reducing File size..
    You can try saving the workbook in *.xlsb format and see if there is any considerable difference.

    For calling Excel General function in the vba,
    you should know about Worksheetfunction Object.
    and Evaluate Function as well.

+ 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. Using Index/Match to return multiple values for one match
    By superboy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-10-2014, 06:21 PM
  2. [SOLVED] Two criteria Index Match on multiple sheets returning multiple values
    By Joak in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-21-2014, 10:03 AM
  3. Replies: 2
    Last Post: 07-17-2012, 11:53 AM
  4. index and match in multiple worksheets and bring corresponding row
    By nickgoldie in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-14-2010, 04:32 PM
  5. Index/Match and Multiple Values
    By irishrose79 in forum Excel General
    Replies: 5
    Last Post: 05-27-2009, 04:40 AM

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