Counting numerous entries but only identifying each entry once

Zakky

Board Regular
Joined
Mar 26, 2016
Messages
143
Office Version
  1. 365
Platform
  1. Windows
Hello, Mr Excel Team.
I hope someone can make my life a little easier by solving an Excel issue.
I get a report with list of employees which repeats each name several times. I need to count the total number of unique employees by placing 1 next to the name. I need number 1 because i can then do a COUNT to count the total number of employees on the list. At the moment I'm placing 1 next to each employee. Is there a better and quicker was to do it so '1' is placed as shown on the attached screenshot? The list keeps growing so need it to be dynamic so that it includes the last entry. Many thanks.
 

Attachments

  • count.PNG
    count.PNG
    6.3 KB · Views: 5

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
In Excel 365, try:
Rich (BB code):
=COUNTA(UNIQUE(FILTER($B2:$B2000; $B2:$B2000<>"")))
Book1
ABC
1NAME7
2Malaki
3Dominik
4Makai
5Marlon
6Ridge
7Matteo
8Dominik
9Makai
10Marlon
11Ridge
12Abraham
13
Sheet4
Cell Formulas
RangeFormula
C1C1=COUNTA(UNIQUE(FILTER($B2:$B2000, $B2:$B2000<>"")))
 
Upvote 0
Akuini, thank you for the quick response. I have other data related to each employee to the left and right columns which i cannot delete. I need the '1' next to each name (preferably on the first name that appears) so it aligns with other data. For example employee ID can appear 5 items in, say, column 'A' highlighting that all data in those rows relates to that employee. This is why i can't have 5 x '1' because it will then count 5 instead of '1'. if the only data i had were names in a list then your function would work.
 
Upvote 0
Akuini, thank you for the quick response. I have other data related to each employee to the left and right columns which i cannot delete. I need the '1' next to each name (preferably on the first name that appears) so it aligns with other data. For example employee ID can appear 5 items in, say, column 'A' highlighting that all data in those rows relates to that employee. This is why i can't have 5 x '1' because it will then count 5 instead of '1'. if the only data i had were names in a list then your function would work.
I can do that with VBA but not formula.
So, hopefully somebody will be able to help you with the formula.
 
Upvote 0
Would this work for you?
Drag formula down as needed.
Book2
AB
1CountEMP Name
21Employee A
3 Employee A
4 Employee A
51Employee B
6 Employee B
7 Employee B
8 Employee B
9 Employee B
101Employee C
11 Employee C
12 Employee C
13 Employee C
141Employee D
15 Employee D
161Employee E
17 Employee E
181Employee F
19 Employee F
20 Employee F
211Employee G
22 Employee G
23 Employee G
Sheet1
Cell Formulas
RangeFormula
A2:A23A2=IF(COUNTIF($B$2:B2,B2)=1,1,"")
 
Upvote 0
AhoyNC, magic! Exactly what I was looking for. thank you for your help.
 
Upvote 0

Forum statistics

Threads
1,215,084
Messages
6,123,021
Members
449,092
Latest member
ikke

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