Delete rows if same ID exists more than twice

BradleyS

Active Member
Joined
Oct 28, 2006
Messages
351
Office Version
  1. 2010
Platform
  1. Windows
I have a list of numbers in column A which are all sorted as follows, and there is other data in columns B to E

43
43
43
56
76
76
83
83
83
83

I only want to see the earliest 2 unique numbers of each. Where there is more than 2 the remaining matching ROWS (A to E)need to be deleted. Therefore in the example above is should look like:

43
43
56
76
76
83
83

Having less than 2 is fine, but no more than 2. Is this possible?
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
put this in H1, a dummy column H, say, and copy down

=COUNTIF($A$1:A1,A1)

then put a filter in Row 1 and delete all rows with 3 or higher in Col H
 
Last edited:
Upvote 0
Solution

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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