count duplicates

mwperkins

Board Regular
Joined
Oct 29, 2002
Messages
155
Hi
is there an array formula that can count how many duplicates exist in column A?

thanks
Mark
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

jorismoerings

Well-known Member
Joined
Jul 4, 2014
Messages
1,486
Office Version
  1. 365
  2. 2016
  3. 2013
Platform
  1. Windows
Hi mark,

try this =SUM(1/COUNTIF($A$1:$A$100,$A$1:$A$100)) as array.
Adjust the range to your need and be aware this will only work if there are no blanks in your range.

An non array alternative could be: =SUMPRODUCT(($A$1:$A$100<>"")/COUNTIF($A$1:$A$100,$A$1:$A$100&""))

Hope this helps
 

mwperkins

Board Regular
Joined
Oct 29, 2002
Messages
155
many thanks, but both formulas tell me how many different values there are, not how many values occur more than once
 

jorismoerings

Well-known Member
Joined
Jul 4, 2014
Messages
1,486
Office Version
  1. 365
  2. 2016
  3. 2013
Platform
  1. Windows
Hi Mark,

You're right. So add a simple count to the formula.
So it becomes: =COUNT($A$1:$A$100)-SUMPRODUCT(($A$1:$A$100<>"")/COUNTIF($A$1:$A$100,$A$1:$A$100&""))
This will give you the number of duplicate value in the list however not which one.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,382
Messages
5,836,931
Members
430,463
Latest member
mikmob

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top