View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Harlan Grove Harlan Grove is offline
external usenet poster
 
Posts: 733
Default Using the mode function

"T. Valko" wrote...
....
Another possible option is to sort your range of numbers in
descending order then the normal formula would work:

=MODE(range)


In that vein, define a name like seq referring to

=ROW(INDEX(Sheet1!$1:$65536,1,1):INDEX(Sheet1!$1:$ 65536,1024,1))

(change the 1024 to whatever is the best trade-off between performance
and inclusiveness), and use array formulas like

=MODE(IF(seq<=COUNT(Data),LARGE(Data,seq)))

This does more work than

=MAX(IF(COUNTIF(Data,Data)=COUNTIF(Data,MODE(Data) ),Data))