ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Count unique occurrences of name (https://www.excelbanter.com/excel-discussion-misc-queries/48725-count-unique-occurrences-name.html)

jhicsupt

Count unique occurrences of name
 
In Column A are the employees' names. The employee's name could be in the
column numerous times. Each employee belongs to a district, which is in
column B. So if name is John and it appears five times, then in cell C2, I
want to display 1. If there is another employee, Judy for instance that
appears 3 times, then in cell C2, I want to put 2, because there are 2 unique
names.

Can anyone help me with this formula?

Thanks in advance.

Barb Reinhardt

Let's say you want to count the number of times that the value entered in
cell A2 is contained in the range A2:A100.

=COUNTIF(A$2:A$100,A2)

"jhicsupt" wrote:

In Column A are the employees' names. The employee's name could be in the
column numerous times. Each employee belongs to a district, which is in
column B. So if name is John and it appears five times, then in cell C2, I
want to display 1. If there is another employee, Judy for instance that
appears 3 times, then in cell C2, I want to put 2, because there are 2 unique
names.

Can anyone help me with this formula?

Thanks in advance.


B. R.Ramachandran

Hi,

Are there only first names (e.g., John, Judy) in column A; where are the
last names contained?
If column A has only first names, as I understand from your posting,

=COUNTIF($A$2:$A$100,"John")

Regards,
B. R. Ramachandran

"jhicsupt" wrote:

In Column A are the employees' names. The employee's name could be in the
column numerous times. Each employee belongs to a district, which is in
column B. So if name is John and it appears five times, then in cell C2, I
want to display 1. If there is another employee, Judy for instance that
appears 3 times, then in cell C2, I want to put 2, because there are 2 unique
names.

Can anyone help me with this formula?

Thanks in advance.


Domenic

Try...

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

Hope this helps!

In article ,
"jhicsupt" wrote:

In Column A are the employees' names. The employee's name could be in the
column numerous times. Each employee belongs to a district, which is in
column B. So if name is John and it appears five times, then in cell C2, I
want to display 1. If there is another employee, Judy for instance that
appears 3 times, then in cell C2, I want to put 2, because there are 2 unique
names.

Can anyone help me with this formula?

Thanks in advance.


JR

....you could run a Pivot Table to summarize the data. Once summarized, and
assuming that each employee is always in the same district, you will have one
line for each unique employee name. You can then count the unique names.

"jhicsupt" wrote:

In Column A are the employees' names. The employee's name could be in the
column numerous times. Each employee belongs to a district, which is in
column B. So if name is John and it appears five times, then in cell C2, I
want to display 1. If there is another employee, Judy for instance that
appears 3 times, then in cell C2, I want to put 2, because there are 2 unique
names.

Can anyone help me with this formula?

Thanks in advance.



All times are GMT +1. The time now is 07:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com