counting unique values

mbernal

New Member
Joined
Apr 10, 2018
Messages
5
Hello - i am trying to write an equation that counts the number of unique values with a criteria associated with it. Below is an example data set, what I want to count is a number of unique animals (column A) but based on a criteria (column B). Using the below I would want an equation that counted the number of unique animals associated with Ed
Ed = 3 animals

Animal Person
Dog Ed
Cat Rob
Frog Jan
Monkey James
Dog Ed
Dog Rob
Cat Ed
Elephant Ed

Thanks!
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
This is an array formula and must be entered with CTRL-SHIFT-ENTER.
Excel Workbook
ABCD
1AnimalPersonPerson =Ed
2DogEdCount3
3CatRob
4FrogJan
5MonkeyJames
6DogEd
7DogRob
8CatEd
9ElephantEd
Sheet
 
Upvote 0
You're welcome.
You could add a 2nd criteria. How about an example of what you want to add.
 
Upvote 0
if we use the origional example but add a criteria in column C that says a Y or N. Then I would want the unique count of animals that is attributed to Ed and with a Y

[TABLE="width: 304"]
<tbody>[TR]
[TD]Animal[/TD]
[TD]Person[/TD]
[TD]Sent[/TD]
[TD]Person =[/TD]
[TD]Ed[/TD]
[/TR]
[TR]
[TD]Dog[/TD]
[TD]Ed[/TD]
[TD]Y[/TD]
[TD]Count[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Cat[/TD]
[TD]Rob[/TD]
[TD]Y[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Frog[/TD]
[TD]Jan[/TD]
[TD]Y[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Monkey[/TD]
[TD]James[/TD]
[TD]N[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Dog[/TD]
[TD]Ed[/TD]
[TD]N[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Dog[/TD]
[TD]Rob[/TD]
[TD]N[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Cat[/TD]
[TD]Ed[/TD]
[TD]N[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Elephant[/TD]
[TD]Ed[/TD]
[TD]Y[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
</tbody><colgroup><col><col span="2"><col><col></colgroup>[/TABLE]
 
Upvote 0
Enter with CTRL-SHIFT-ENTER.
Excel Workbook
ABCDE
1AnimalPersonSentPerson =Ed
2DogEdYSent =Y
3CatRobYCount2
4FrogJanY
5MonkeyJamesN
6DogEdN
7DogRobN
8CatEdN
9ElephantEdY
Sheet
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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