Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-09-2011, 12:48 AM
zanat0s zanat0s is offline Count in Excel Windows 7 64bit Count in Excel Office 2007
Novice
Count in Excel
 
Join Date: May 2011
Posts: 8
zanat0s is on a distinguished road
Default Count in Excel

Hi,

I have a question. Lets say i have an excel with some data. I need to count in a column(or a row) all the unique entries.

for example
Name
1 John
2 george
3 Merlin
4 Darko
5 George
6
7 Pikachu
8 Superman
9 Drado



I want to count how many Unique names appear on the excel, not the total number of names. What is the exact formula?

Thank you
Reply With Quote
  #2  
Old 06-09-2011, 07:07 AM
Colin Legg's Avatar
Colin Legg Colin Legg is offline Count in Excel Windows 7 32bit Count in Excel Office 2010 32bit
Expert
 
Join Date: Jan 2011
Location: UK
Posts: 369
Colin Legg will become famous soon enough
Default

Please can you clarify what you mean by "unique"?


Do you want a count of the names which only appear once:

John
John
Peter
Bob

would give a count of 2, because John appears more than once so the unique names are Peter and Bob.



....or do you want a count of distinct names?

John
John
Peter
Bob

Would give a count of 3, because there are 3 distinct names in the list: John, Peter, Bob.
__________________
Colin

RAD Excel Blog
Reply With Quote
  #3  
Old 06-09-2011, 07:50 AM
zanat0s zanat0s is offline Count in Excel Windows 7 64bit Count in Excel Office 2007
Novice
Count in Excel
 
Join Date: May 2011
Posts: 8
zanat0s is on a distinguished road
Default

I want to count how many Unique names there are.

for example how many different names appear at least once
Reply With Quote
  #4  
Old 06-09-2011, 10:53 AM
Colin Legg's Avatar
Colin Legg Colin Legg is offline Count in Excel Windows 7 32bit Count in Excel Office 2010 32bit
Expert
 
Join Date: Jan 2011
Location: UK
Posts: 369
Colin Legg will become famous soon enough
Default

That means you want to count the distinct items, not the unique ones.

There are several formulas which can be used to do this, but none of them are simple. The most commonly used one, as outlined here, is:

Code:
=SUM(IF(FREQUENCY(IF(A1:A100<>"",MATCH("~"&A1:A100,A1:A100&"",0)),ROW(A1:A100)-ROW(A1)+1),1))
This is an array formula so when you type it into the formula bar you have to complete the entry with CTRL+SHIFT+ENTER, not just ENTER. You will also have to adjust the A1:A100 references to the range containing your names, and A1 to the first cell in the range containing your names.

If you prefer I can direct you to a VBA UDF which will make the formula simpler.
__________________
Colin

RAD Excel Blog
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Count in Excel Count with multiple conditions bundy5150 Excel 4 02-22-2011 10:00 AM
Don't count hidden slides Lu_Argentina PowerPoint 0 10-12-2010 02:12 PM
How to Count from Different Cells? Shahzad Excel 3 06-26-2010 01:06 AM
changing word count hamster Word 3 06-03-2010 01:53 AM
Don't count 0 in a chart Rmaisone Excel 0 08-21-2006 12:26 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:31 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft