+ Reply to Thread
Results 1 to 5 of 5

Thread: 2 dimensional array look up

  1. #1
    Registered User
    Join Date
    05-09-2011
    Location
    san jose, ca
    MS-Off Ver
    Excel 2003
    Posts
    3

    2 dimensional array look up

    Hello,

    I am in need of help on a 2 dimensional array table. I have a table that have unsorted data and would like to return the column heading as well as the row heading of the minimum value in the table.


    AA BB CC DD EE
    HH 205 208 341 295 132
    II 109 112 245 199 228
    JJ 141 83 180 170 293
    KK 122 119 50 125 459
    LL 476 472 339 386 812


    Column Min KK
    Row Min CC

    In this example, the minimum value is 50 under the heading CC and KK. I would like to return these 2 values in 2 separate cell. I have tried index(match) but this will only work on a 1 Dimensional array.

    Any help would be appreciated.

    Tin
    Attached Files Attached Files
    Last edited by romperstomper; 07-08-2011 at 05:21 PM.

  2. #2
    Forum Guru Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007
    Posts
    3,523

    Re: 2 dimensional array look up

    You could use a helper row & column.

    helper row: B7: = MIN(B2:B6), copied across to F7

    helper column: G2: = MIN(B2:F2), copied down to G6

    C9: =INDEX(A2:A6,MATCH(MIN(G2:G6),G2:G6,0))
    C10: =INDEX(B1:F1,,MATCH(MIN(B7:F7),B7:F7,0)) :
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  3. #3
    Registered User
    Join Date
    05-09-2011
    Location
    san jose, ca
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: 2 dimensional array look up

    Hello Palmetto,

    Thank you for the solution. I got it to work the way you explained it. Is there a way to do this without using the helper row and columns?

    Tin

  4. #4
    Forum Guru ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    traded up
    MS-Off Ver
    2003 & 2010
    Posts
    1,905

    Re: 2 dimensional array look up

    Hi scorer,

    To do this without helper rows, the formulas get a little more complex.

    For Column Min use:

    =INDEX(A2:A6,SMALL(IF(B2:F6=MIN(B2:F6),ROW(A2:A6)-ROW(A2)+1),1),1)
    entered with Ctrl-Shift-Enter.

    And for Row Min use:

    =INDEX(B1:F1,1,SMALL(IF(B2:F6=MIN(B2:F6),COLUMN(B1:F1)-COLUMN(B1)+1),1))
    also entered with Ctrl-Shift-Enter.

    Cheers,
    “To sin by silence when they should protest makes cowards of men.” ~ Abraham Lincoln

  5. #5
    Registered User
    Join Date
    05-09-2011
    Location
    san jose, ca
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: 2 dimensional array look up

    Thank you ConneXionLost,

    That works great!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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.2.0