If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 How to determine the top 5 occurrences from a list of numbers?
 Author Name Remember Me? Password
 Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How to determine the top 5 occurrences from a list of numbers?

 Thread Tools Display Modes
#1
September 25th 07, 05:52 AM posted to microsoft.public.excel.misc
 Eric external usenet poster Posts: 1,670
How to determine the top 5 occurrences from a list of numbers?

Does anyone have any suggestions on how to determine the top 3 occurrences
from a list of numbers? For example,

1,1,1,1,1,2,2,2,3,3,3,3,3,3,4,4,5,5,5,5,5,6,6,6,6, 7,7,7,7,7 under column A
The occurrence of 1 is 5 times
The occurrence of 2 is 3 times
The occurrence of 3 is 6 times
The occurrence of 4 is 2 times
The occurrence of 5 is 5 times
The occurrence of 6 is 4 times
The occurrence of 7 is 5 times

It should return 3 in cell B1, 1 in cell B2, 5 in cell B3,
Since there are 3 numbers having 5 occurrences - 1,5,7, I only need to
select the rest of 2 numbers, then I prefer the smaller one 1, 5, and
ignoring 7.

Does anyone have any suggestions on how to do it in excel?
Thanks ver much in advance for any suggestions
Eric

 Ads
#2
September 25th 07, 08:32 AM posted to microsoft.public.excel.misc
 excelent external usenet poster Posts: 695
How to determine the top 5 occurrences from a list of numbers?

try FREQUENCY

=FREQUENCY(a1:a20;1) returns numbers of 1'ns

"Eric" skrev:

> Does anyone have any suggestions on how to determine the top 3 occurrences
> from a list of numbers? For example,
>
> 1,1,1,1,1,2,2,2,3,3,3,3,3,3,4,4,5,5,5,5,5,6,6,6,6, 7,7,7,7,7 under column A
> The occurrence of 1 is 5 times
> The occurrence of 2 is 3 times
> The occurrence of 3 is 6 times
> The occurrence of 4 is 2 times
> The occurrence of 5 is 5 times
> The occurrence of 6 is 4 times
> The occurrence of 7 is 5 times
>
> It should return 3 in cell B1, 1 in cell B2, 5 in cell B3,
> Since there are 3 numbers having 5 occurrences - 1,5,7, I only need to
> select the rest of 2 numbers, then I prefer the smaller one 1, 5, and
> ignoring 7.
>
> Does anyone have any suggestions on how to do it in excel?
> Thanks ver much in advance for any suggestions
> Eric
>

#3
September 25th 07, 08:32 AM posted to microsoft.public.excel.misc
 excelent external usenet poster Posts: 695
How to determine the top 5 occurrences from a list of numbers?

ups: use , not ;
=FREQUENCY(a1:a20,1)

"Eric" skrev:

> Does anyone have any suggestions on how to determine the top 3 occurrences
> from a list of numbers? For example,
>
> 1,1,1,1,1,2,2,2,3,3,3,3,3,3,4,4,5,5,5,5,5,6,6,6,6, 7,7,7,7,7 under column A
> The occurrence of 1 is 5 times
> The occurrence of 2 is 3 times
> The occurrence of 3 is 6 times
> The occurrence of 4 is 2 times
> The occurrence of 5 is 5 times
> The occurrence of 6 is 4 times
> The occurrence of 7 is 5 times
>
> It should return 3 in cell B1, 1 in cell B2, 5 in cell B3,
> Since there are 3 numbers having 5 occurrences - 1,5,7, I only need to
> select the rest of 2 numbers, then I prefer the smaller one 1, 5, and
> ignoring 7.
>
> Does anyone have any suggestions on how to do it in excel?
> Thanks ver much in advance for any suggestions
> Eric
>

#4
September 25th 07, 10:30 AM posted to microsoft.public.excel.misc
 RichardSchollar[_2_] external usenet poster Posts: 76
How to determine the top 5 occurrences from a list of numbers?

On 25 Sep, 05:52, Eric > wrote:
> Does anyone have any suggestions on how to determine the top 3 occurrences
> from a list of numbers? For example,
>
> 1,1,1,1,1,2,2,2,3,3,3,3,3,3,4,4,5,5,5,5,5,6,6,6,6, 7,7,7,7,7 under column A
> The occurrence of 1 is 5 times
> The occurrence of 2 is 3 times
> The occurrence of 3 is 6 times
> The occurrence of 4 is 2 times
> The occurrence of 5 is 5 times
> The occurrence of 6 is 4 times
> The occurrence of 7 is 5 times
>
> It should return 3 in cell B1, 1 in cell B2, 5 in cell B3,
> Since there are 3 numbers having 5 occurrences - 1,5,7, I only need to
> select the rest of 2 numbers, then I prefer the smaller one 1, 5, and
> ignoring 7.
>
> Does anyone have any suggestions on how to do it in excel?
> Thanks ver much in advance for any suggestions
> Eric

Hi Eric

MODE will give you the most frequent occurrence ie so in B1:

=MODE(A1:A50)

(adjust range to suit).

So get the next most frequent eg in B2 downwards you could use:

=MODE(IF(ISNA(MATCH(\$A\$1:\$A\$50,\$B\$1:\$B1,0)),\$A\$1:\$ A\$50))

confirmed with Ctrl+Shift+Enter and copied down as required.

Note that this is not a complete answer, as the order for ties (ie for
5 and 7) is determined by which appears first in the list.

Have you considered using a pivot table for this instead?

Richard

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts vB code is On Smilies are On [IMG] code is On HTML code is Off
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Excel Newsgroups     Excel Discussion (Misc queries)     Setting up and Configuration of Excel     New Users to Excel     Excel Worksheet Functions     Links and Linking in Excel     Charts and Charting in Excel     Excel Programming About ExcelBanter     About this forum

 Similar Threads Thread Thread Starter Forum Replies Last Post How to determine the value from a list? Eric Excel Discussion (Misc queries) 3 July 8th 07 11:30 AM How to determine the frequency of a list of numbers? Eric Excel Discussion (Misc queries) 3 June 15th 07 08:58 AM How to determine the value from a list? Eric Excel Discussion (Misc queries) 6 May 22nd 07 06:51 PM How do I determine which numbers in a list equal a given sum? infraterra Excel Discussion (Misc queries) 11 October 7th 05 11:39 PM List ? - How do I make information in one cell determine list to u Brad_A Excel Worksheet Functions 1 January 18th 05 04:10 PM

All times are GMT +1. The time now is 01:07 AM.

 - Contact Us - ExcelBanter forum home - FAQ - Links - Privacy Statement - Top

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