• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

2 dimensional MATCH

Hi,

Is it possible to locate the cell containing a specific value in a 2D array?

I have an array of cells (columns Y:AJ) which is scattered with unique numbers. These numbers correspond to data in columns M:X (ie if there is data in M2, there will be a serial number in Y2).

I have been able to produce a list of the numbers in one column, by using the SMALL function, however I can't work out how to show the equivalent data for each number. I was using a combination of INDEX and MATCH, however MATCH only appears to work in 1 column at a time - is there a way to use this over multiple columns, or alternatively use a text equivalent of SMALL to do something similar for the text as for the numbers?

File attached to demonstrate (hopefully) what I mean.

Thanks in advance for your time and help!

cb
 

Attachments

  • unique values.xlsx
    61.5 KB · Views: 7
Hi, caladanbrood!
A doubt. I got a little confused with your ranges, are you sure that where you say columns Y:AJ you shouldn't have said A:J?
A suggestion? Not yet.
Regards!
 
Hi, caladanbrood!

Give a look at the uploaded file.

Formula for column AB:
AB2: =INDICE(AgentTable;SUMAPRODUCTO((NumberTable=Y2)*(FILA(NumberTable)))-FILA(NumberTable)+1;SUMAPRODUCTO((NumberTable=Y2)*(COLUMNA(NumberTable)))-COLUMNA(NumberTable)+1) -----> in english: =INDEX(AgentTable,SUMPRODUCT((NumberTable=Y2)*(ROW(NumberTable)))-ROW(NumberTable)+1,SUMPRODUCT((NumberTable=Y2)*(COLUMN(NumberTable)))-COLUMN(NumberTable)+1)

Copy down as required.

Named ranges:
AgentTable: =$A$2:$J$50
NumberTable: =$M$2:$X$50

Regards!
 

Attachments

  • 2 dimensional MATCH - unique values (for caladanbrood at chandoo.org).xlsx
    61.9 KB · Views: 9
Ah yes, you were right - I was writing my post from the actual spreadsheet, and then created a new one with different column values in order to upload. Apologies!!

This solution looks perfect though. Thank you so much for your help, as always very much appreciated!!!

cb
 
Hi, caladanbrood!
Glad you solved it. Thanks for your feedback and for your kind words too. And welcome back whenever needed or wanted.
Regards!
 
Back
Top