how to formulate new columns for unique values and duplicates

nickgoss

New Member
Joined
Jun 28, 2019
Messages
3
Ive spent the last 2 hours almost searching and cant quite seem to find the right formula(s) to get what i want.

I have a list of employee numbers (that are occurring more than once) and want two things from that list, the first being a separate column displaying the employee numbers without duplicates and the second being the number of times that employee number has appeared in the list.

My end goal is something like this and i am a complete beginner with excel.

Original list - Employee Number - Occurrences

1234 1234 4
1234 5678 2
1234
5678
5678
1234
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Excel has an inbuilt remove duplicates tool built under Data ribbon tab - so copy Column A to Column B, highlight Column B and Remove Duplicates -> Then to get Occurrences use a COUNTIF function

=COUNTIF($A$1:$A$6,B1)

For example will count how many times the value in cell B1 appears in the data range A1:A6 - change the range to see fit to your situation, put this formula in cell C1 (or whereever is best as you might have headers so then start with C2 and adjust accordingly)
 
Last edited:
Upvote 0
Thank you for your quick reply! This has worked and now i feel stupid as it was so simple, been watching too many far more complex videos and giving myself a headache lol
 
Upvote 0

Forum statistics

Threads
1,224,747
Messages
6,180,719
Members
452,995
Latest member
isldboy

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