Thread: Match function
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Match function

With that many cells to check this will be *SLOW* plus it's volatile. You'd
probably be better off using a UDF.

This will return the cell address using duplicate precedence of top to
bottom, left to right.

Use a helper cell to get the max value:

tbl = your range

=MAX(tbl)

Assume that formula is entered in cell A1.

For the cell address for the max value...

Array entered** :

=CELL("address",INDEX(tbl,MIN(IF(tbl=A1,ROW(tbl)-MIN(ROW(tbl))+1)),MATCH(A1,INDEX(tbl,MIN(IF(tbl=A1 ,ROW(tbl)-MIN(ROW(tbl))+1)),0),0)))

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

--
Biff
Microsoft Excel MVP


"fireflyrt" wrote in message
...
Not likely, but if there are finding the first one would suffice. FYI I've
had to split up the array into 250x4000 to allow it to fit within the 256
column limit

"T. Valko" wrote:

1000x1000 array


That's 1 million cells. Are there any duplicates?

--
Biff
Microsoft Excel MVP


"fireflyrt" wrote in message
...
The Match function seems to work only on 1 dimensional arrays. Is there
any
such function that returns the cell reference for a match in a 2d
array?

For example, I am trying to find the cell location of a max number in a
1000x1000 array of data - is there a function that will do that?