Remove rows that have duplicate numbers in column "A"

IrishMist1748

Board Regular
Joined
Sep 27, 2010
Messages
131
I have a table with around 6,400 rows. It has 2 columns (A and B). "A" contains an item number and "B" contains a description. My problem is some of the item numbers are duplicated with the same description. What I need to do is delete any item numbers that are duplicated and the entire row associated with that number(s).

What I have is:

Code:
ActiveSheet.Range("A:A").EntireRow.RemoveDuplicates Columns:=1

But it does not work!

Any ideas on this?

Thanks!
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
some of the item numbers are duplicated with the same description
If duplicates are in discription B-column then try thiis:
ActiveSheet.Range("A:A").EntireRow.RemoveDuplicates Columns:=2
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,507
Messages
6,179,176
Members
452,893
Latest member
denay

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