+ Reply to Thread
Results 1 to 2 of 2

look for value in matrix, return values from kolumns corresponding rows where value..

  1. #1
    Registered User
    Join Date
    07-25-2008
    Location
    sweden
    Posts
    4

    look for value in matrix, return values from kolumns corresponding rows where value..

    Greetings people.

    I need some help from you experts out here.

    I'm trying to write a formula to search for a value in a matrix and return a value from a separate column in the rows where the values are found.

    Attaching a file to help illustrate what I want.

    I want to search for the values from the green fields in the yellow area, returning the value from purple field of the rows where the values are found into the blue area.

    so for row 17 in my example file the value I want returned is "AH" as the value "1" is found in the two rows with A and H in the column preceding the searched matrix.

    The searched matrix can be expected to be sorted from small to large number in the individual rows. a value can be found in one or more rows.

    Been trying for a while now but can't seem to nail it down.

    I really want a compact formula as I'm inserting it into a larger formula and don't want it to grow beyond what I can fit.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474
    Since the number 2 occurs in two rows, shouldn't the result be AB, and not just B? If this is correct, assuming that each number for which to search will only occur once in any row, try the following...

    1) Download and install the free add-in, Morefunc.

    2) Then try...

    J17, confirmed with CONTROL+SHIFT+ENTER, and copied down:

    =MCONCAT(IF($C$17:$G$22=$I17,$B$17:$B$22,""))

    or

    =IF(COUNTIF($C$17:$G$22,$I17),MCONCAT(IF($C$17:$G$22=$I17,$B$17:$B$22,"")),0)

    The first one will leave the cell blank when no match is found, whereas the second one will return a zero.

    Hope this helps!
    Last edited by Domenic; 11-24-2008 at 10:19 AM.

+ 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