Select all the cells of Array1 and Array2 and name the selection DATA via the Name Box. Select the cells of Array1 and name it (if not done so yet) LVALUES.
Enter in some cell: =VLOOKUP(MAX(LVALUES),DATA,2,0)
Aladin
Thanks for the help Aladin - Nice one :-)
Thanks for the help.
Tried what you suggested but returned #NA error.
Could I send you the workbook with the example in please (or you send me an example)?
sorry to be a pain.
Thanks
Mike
Mike
#N/A means that the lookup value (in your case MAX(LVALUES)) is not available in DATA, the lookup table. In your case, it's strange, because the MAX value has been computed from the 1st column of DATA, thus it's there.
An example is underway to you.
Aladin
Mike
It's obvious (after seeing your example data) that I misread the problem. A sin too many, which dragged me into this difficult case. Sigh. Here we go, but first your example data.
{3,4,5,3,4,5;7,8,9,2,3,4;10,11,12,"mike","aladin","mike"}
Lets say that these data occupies the range A3:F5.
You want to compute the MAX of values occupying A3:C5 (matrix1) and retrieve the value of the cell that occupies the same position in the range D3:F5 (matrix2).
In this specific example, the max value in matrix1 is 12 and its position in this matrix is (3,3). The value that occupies the (3,3) position in matrix2 is 'mike'.
In G3 enter: =ADDRESS(ROW(F3),COLUMN(F3)) [ copy down this to G5. ]
In H3 enter: =ROW() [ copy down this to H5. ]
in I3 array-enter: =IF(ISNUMBER(MATCH(MAX($A$3:$C$5), TRANSPOSE($A3:$C3),0)),MATCH(MAX($A$3:$C$5), TRANSPOSE($A3:$C3),0),"") [ You need to hit CONTROL+SHIFT+ENTER to enter this formula; Then copy down this to I5. ]
In J3 enter: =IF(ISNUMBER(I3), VLOOKUP(MAX($A$3:$C$5), INDIRECT(ADDRESS(H3,I3)&":"&G3),I3+1,0),"") [ copy down this to J5. ]
The above system of formulas will produce somewhere in column J the value you are looking for.
I hope someone has something better/shorter on offer.
Aladin