Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Using the mode function

I have a group of numbers that I am trying to find the the mode of using the
mode function. When I have multiple mode i.e 200 shows twice and 201 shows
twice the standard function returns the lower of the two modes and I want it
to return the higher of the two modes. Is there anyone who can help me figure
this out.
--
Detra (Thanks)
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 21
Default Using the mode function

Try
=Mode(max(values))
let me know.

"Detra E." wrote in message
...
I have a group of numbers that I am trying to find the the mode of using
the
mode function. When I have multiple mode i.e 200 shows twice and 201 shows
twice the standard function returns the lower of the two modes and I want
it
to return the higher of the two modes. Is there anyone who can help me
figure
this out.
--
Detra (Thanks)



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Using the mode function

MODE returns the *first* mode of the range. For example:

200
200
201
201

MODE = 200

201
201
200
200

MODE = 201

Try this array formula**. I'm assuming there is at least one mode:

=MAX(IF(COUNTIF(A1:A10,A1:A10)=MAX(COUNTIF(A1:A10, A1:A10)),A1:A10))

If there is no mode the above formula will still return a value. You can add
a test that returns a blank (or whatever you want) if there is no mode:

=IF(ISNA(MODE(A1:A10)),"",MAX(IF(COUNTIF(A1:A10,A1 :A10)=MAX(COUNTIF(A1:A10,A1:A10)),A1:A10)))

--
Biff
Microsoft Excel MVP


"Detra E." wrote in message
...
I have a group of numbers that I am trying to find the the mode of using
the
mode function. When I have multiple mode i.e 200 shows twice and 201 shows
twice the standard function returns the lower of the two modes and I want
it
to return the higher of the two modes. Is there anyone who can help me
figure
this out.
--
Detra (Thanks)



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 733
Default Using the mode function

"Leo Rod" <leo@rod_com wrote...
Try
=Mode(max(values))
let me know.

....

Learn to test before responding. MAX(anything) returns only one value,
and MODE(just_one_value) *ALWAYS* returns #N/A. MODE will only return
a value when passed values, arrays or ranges that contain at least two
equal values. So MODE(1,2) returns #N/A, while MODE(3,3) returns 3.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Using the mode function

I forgot to include something in my reply:

Try this array formula**.


** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

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

=MODE(range)

--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
MODE returns the *first* mode of the range. For example:

200
200
201
201

MODE = 200

201
201
200
200

MODE = 201

Try this array formula**. I'm assuming there is at least one mode:

=MAX(IF(COUNTIF(A1:A10,A1:A10)=MAX(COUNTIF(A1:A10, A1:A10)),A1:A10))

If there is no mode the above formula will still return a value. You can
add a test that returns a blank (or whatever you want) if there is no
mode:

=IF(ISNA(MODE(A1:A10)),"",MAX(IF(COUNTIF(A1:A10,A1 :A10)=MAX(COUNTIF(A1:A10,A1:A10)),A1:A10)))

--
Biff
Microsoft Excel MVP


"Detra E." wrote in message
...
I have a group of numbers that I am trying to find the the mode of using
the
mode function. When I have multiple mode i.e 200 shows twice and 201
shows
twice the standard function returns the lower of the two modes and I want
it
to return the higher of the two modes. Is there anyone who can help me
figure
this out.
--
Detra (Thanks)







  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 733
Default Using the mode function

"T. Valko" wrote...
MODE returns the *first* mode of the range. For example:

....
. . . You can add a test that returns a blank (or whatever you
want) if there is no mode:

=IF(ISNA(MODE(A1:A10)),"",
MAX(IF(COUNTIF(A1:A10,A1:A10)=MAX(COUNTIF(A1:A10, A1:A10)),A1:A10)))


Do less work, get the same result.

=IF(ISNA(MODE(x)),"",MAX(IF(COUNTIF(x,x)=COUNTIF(x ,MODE(x)),x)))

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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))

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Using the mode function

"Harlan Grove" wrote in message
ups.com...
"T. Valko" wrote...
MODE returns the *first* mode of the range. For example:

...
. . . You can add a test that returns a blank (or whatever you
want) if there is no mode:

=IF(ISNA(MODE(A1:A10)),"",
MAX(IF(COUNTIF(A1:A10,A1:A10)=MAX(COUNTIF(A1:A10 ,A1:A10)),A1:A10)))


Do less work, get the same result.

=IF(ISNA(MODE(x)),"",MAX(IF(COUNTIF(x,x)=COUNTIF(x ,MODE(x)),x)))


Yep, that "works" for me!

--
Biff
Microsoft Excel MVP


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mkae Mode function return "" instead of #N/A when there is no Mode Tonso Excel Discussion (Misc queries) 1 March 11th 07 10:38 AM
Mkae Mode function return "" instead of #N/A when there is no Mode Tonso Excel Discussion (Misc queries) 2 March 10th 07 05:10 PM
MODE Function cesar Excel Worksheet Functions 1 January 4th 07 10:47 PM
MODE Function Anita Excel Worksheet Functions 5 December 12th 05 04:28 PM
MODE function Dobbie22 Excel Worksheet Functions 2 December 10th 04 04:13 PM


All times are GMT +1. The time now is 11:41 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"