Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default Returning the most duplicated item

Let's say I have a column with a bunch of names in it, and I want a function
that will return the name that shows up the most often (the mode I guess).
How do I do that?

I know how to do it if the items are numerical data, but how do I do it with
text?

For example, suppose this is a column:

Smith
Johnson
Smith
Roberts
Johnson
Mulligan
Roberts
Smith
Williams
Williams
Smith

I want a function that will return "Smith" as the name that appears the most
often.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Returning the most duplicated item


Hi

Assuming that your data is in A1:A11, then array enter (ctrl, shift,
enter) the formula


Code:
--------------------
=INDEX(A:A,MIN(IF(COUNTIF(A1:A11,A1:A11)=MAX(COUNT IF(A1:A11,A1:A11)),ROW(A1:A11),"")))
--------------------


rylo


--
rylo
------------------------------------------------------------------------
rylo's Profile: http://www.thecodecage.com/forumz/member.php?userid=28
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=33152

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Returning the most duplicated item

Assuming no empty cells.

Array entered** :

=INDEX(A1:A11,MODE(MATCH(A1:A11,A1:A11,0)))

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

--
Biff
Microsoft Excel MVP


"Joe Lewis" wrote in message
...
Let's say I have a column with a bunch of names in it, and I want a
function
that will return the name that shows up the most often (the mode I guess).
How do I do that?

I know how to do it if the items are numerical data, but how do I do it
with
text?

For example, suppose this is a column:

Smith
Johnson
Smith
Roberts
Johnson
Mulligan
Roberts
Smith
Williams
Williams
Smith

I want a function that will return "Smith" as the name that appears the
most
often.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Returning the most duplicated item

=INDEX(A1:A11,MODE(INDEX(MATCH(A1:A11,A1:A11,),)))

Just press Enter


"Joe Lewis" wrote:

Let's say I have a column with a bunch of names in it, and I want a function
that will return the name that shows up the most often (the mode I guess).
How do I do that?

I know how to do it if the items are numerical data, but how do I do it with
text?

For example, suppose this is a column:

Smith
Johnson
Smith
Roberts
Johnson
Mulligan
Roberts
Smith
Williams
Williams
Smith

I want a function that will return "Smith" as the name that appears the most
often.

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
GET.CHART.ITEM returning strange results Laura Battarbee Charts and Charting in Excel 0 November 29th 07 09:19 PM
Item numbers result in item description in next field in Excel Cheryl MM Excel Worksheet Functions 1 February 20th 07 03:51 PM
Duplicated cells Claudiotto Excel Worksheet Functions 1 September 9th 06 06:08 PM
Returning the last item in column HondaMike New Users to Excel 3 January 4th 05 11:20 AM
Selecting an Item from a List and getting a different item to pop. Matt Excel Worksheet Functions 1 December 7th 04 02:37 PM


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