View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.newusers,microsoft.public.excel.worksheet.functions,microsoft.public.excel.misc
Lori Lori is offline
external usenet poster
 
Posts: 340
Default Finding Location of Maximum Value in 2D Array

Select the range and type "D" in the name box (next to formula bar) as
in Harlan's example.

Then copy and paste this into the name box or Edit Goto (F5) box to
select the first matching cell:

INDIRECT(TEXT(MIN(IF(D=MAX(D),ROW(D)*1000+COLUMN(D ))),"R#C##0"),0)

As a shortcut, define this formula as a name e.g. MaxD (with a leading
= sign) and then type MaxD in the name box.

(Note: For Excel 2007 you would need to add a couple of 0's for the
extra columns)


wrote:
I am using MS Office ExCel 2003(11.6560.6568) SP2 and have a single
sheet with a 2D array of numbers roughly 202x202 in size. Could
someone tell me the quickest way to locate the maximum value in the
array? I tried =WhereMax("Sheet1") but just got #NAME? as the result.

Any assistance would be greatly appreciated,
Peter.