Removal of lines - Duplicates

graemekoz

Board Regular
Joined
Jul 7, 2004
Messages
57
Office Version
  1. 365
Good morning

I have a list of data in two columns. As you can see there are two instances of 123456 but the second column has different data.

For example


123456A
245681B
123456D
987654E


The only thing I'm interested in retaining is the first instance of each number (customer number), so in this case, the 12345 and A would stay but the 123456 and D would be deleted.

Does that make sense? can anyone help?
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Are you interested in a cell Formula solution or VBA solution?
 
Upvote 0
If you need a formula then please advise what version of Excel you are using. Ideally you should update it in your profile so it displays when you post.
 
Upvote 0
No vba, formula

1) select the range
2) [Data] - [RemoveDuplicates]
 
Upvote 0
No vba, formula

1) select the range
2) [Data] - [RemoveDuplicates]
Unfortunately this didn't work. Because the second column doesn't match it doesn't delete anything. What I want it to do is, if the same value appears in the first column, it deletes the duplicate in that column as well as any associated rows .
 
Upvote 0
When RemoveDuplicates dialog comes up, you need to remove tick from column B, so that it removes duplicates in col.A.
Before
Book1
AB
1123456A
2245681B
3123456D
4987654E
Sheet1


after
Book1
AB
1123456A
2245681B
3987654E
4
Sheet1
 
Upvote 0

Forum statistics

Threads
1,223,704
Messages
6,173,984
Members
452,540
Latest member
haasro02

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