Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count unique values in Excel

Status
Not open for further replies.

nickjar2

Programmer
Jun 20, 2001
778
US
Probably dead easy but we are stuck. We have a column in excel, say Column B. I need some code that will loop through the column until there is no more data, and also to not count duplicates. I have done this but usung quite a bit if code. Is there a built in func that will do this. eg.
Col B
1
2
3
4
4
5

The code would return just 5, NOT 6 ie. 4 is duplicated.

Thanks,

Nick
 
Here's an array formula that will work, you can modify it in your code {=SUM(1/COUNTIF(F2:F21,F2:F21))} Just replace the range with the correct one. Good luck.
 
Sorry, Nick. This one's all over the web. Do you ever use search engines for this stuff? I typed this into Yahoo:

"delete duplicates" excel

so that it would find Excel AND the exact phrase "delete duplicates".

Here's some good links:



Go here and look up duplicates for whichever specific task you want to perform:

Brainbench MVP for Microsoft Word
techsupportgirl@home.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top