Counting Unquie Records

Jayfunk

New Member
Joined
May 21, 2012
Messages
6
Hello Guys,

I have a Data set which is a bit like this

Product Sales Person
A Mr Smith
A Mr Smith
A Mr Smith
B Mr Brown
C Mrs Pink
D Mr Smith

What i am trying to do is count how many Products Mr Smith has, if i use the simple count ifs then i would get 4 when the answer is 2, I believe i need to change things in the countifs formula but i am not sure how to do so, also i would need to understand how it works as i get this alot, does anyone of you fine people know an answer to my problem, the simplier the better

So the data set doesn't look right on the screen Product and Sales Person is in two different columns
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Hello,

Presuming your data table starts in A1,

=SUMPRODUCT((B2:B7="Mr Smith")/COUNTIF(A2:A7,A2:A7))

Will return 2; the number of unique entries for Mr Smith.
 
Upvote 0

Forum statistics

Threads
1,216,359
Messages
6,130,171
Members
449,562
Latest member
mthrasher16

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