Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 52
Default Most common occurrence of a string

Hello.
I need a worksheet function that will tell me the most frequent occurrence
of a single character string in a range of cells, the second most, and the
third most.
Example
A B C D E F
1
2 A A B B A C
3
4 1st 2nd 3rd
5 A B C

So a formula in A5 that gives the most common occurrence in range A2:F2. A
formula in B5 that gives the second most frequent occurence and a forumula in
C5 that gives the 3rd.


--
Thanks,
Mike
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default Most common occurrence of a string

Maybe something like this:

With
A1:F1 containing various text values

A6: 1
B6: 2
C6: 3

The most occurring item is
A5:
=INDEX($A$1:$F$1,1,MATCH(LARGE(FREQUENCY(MATCH($A$ 1:$F$1,$A$1:$F$1,0),MATCH($A$1:$F$1,$A$1:$F$1,0)), A6),FREQUENCY(MATCH($A$1:$F$1,$A$1:$F$1,0),MATCH($ A$1:$F$1,$A$1:$F$1,0)),0))

Copy that formula across thru C5 for the 2nd and 3rd most occurring items

Note: That formula will have problems with ties and blanks.
So if those may exist, let us know so we can account for them.

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Mike Archer" wrote:

Hello.
I need a worksheet function that will tell me the most frequent occurrence
of a single character string in a range of cells, the second most, and the
third most.
Example
A B C D E F
1
2 A A B B A C
3
4 1st 2nd 3rd
5 A B C

So a formula in A5 that gives the most common occurrence in range A2:F2. A
formula in B5 that gives the second most frequent occurence and a forumula in
C5 that gives the 3rd.


--
Thanks,
Mike

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
Display common values in first occurrence only JoanE Excel Discussion (Misc queries) 2 November 30th 06 12:14 PM
Occurrence between rows [email protected] Excel Discussion (Misc queries) 1 June 12th 06 06:15 PM
V Lookup 2nd Occurrence Rodney New Users to Excel 8 April 27th 05 05:07 PM
find last occurrence REMnLYN Excel Worksheet Functions 9 March 29th 05 10:43 AM
occurrence (last) reference excelFan Excel Discussion (Misc queries) 4 March 7th 05 11:51 AM


All times are GMT +1. The time now is 08:33 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"