How do I count the duplicate values in a range only once.

scrainey

Board Regular
Joined
Apr 25, 2004
Messages
71
How do I count the duplicate values in a range only once.

I would like to count the number of purchase orders in column "A", and some cells will contain duplicates, I only want to count the duplicates once, the remaining duplicates should not be included in the count.

example:

PS04-120001
PS04-120001
PS04-120002
___________

= 2

Any help would be appreciated
 
Re: How do I count the duplicate values in a range only once

I tried to do a Google search for Brian's post on Morefunc's Add-in and got nothing, but this formula will do what you want just change the range.

=SUMPRODUCT((A1:A3<>"")/COUNTIF(A1:A3,A1:A3&""))

Steve
 
Upvote 0

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Re: How do I count the duplicate values in a range only once

Yogi

Thanks for the reply but the link is not working.

Steve
 
Upvote 0
Re: How do I count the duplicate values in a range only once

does anyone have the scripting for the countdiff addin - as i can't download it on this darned computer!
 
Upvote 0
Re: How do I count the duplicate values in a range only once

dwbolland said:
does anyone have the scripting for the countdiff addin - as i can't download it on this darned computer!

COUNTDIFF is a compiled function from the morefunc add-in. If you can't have the add-in for some reason, you can always use a formula for distinct/unique count with built-in functions.
 
Upvote 0

Forum statistics

Threads
1,214,821
Messages
6,121,762
Members
449,048
Latest member
excelknuckles

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
Back
Top