delete lines based on value and duplicate

VbaHell

Well-known Member
Joined
Jan 30, 2011
Messages
1,220
Hi All

I hope you can help on this please

In column "A" ! have a date (16/3/18)
In column "E" I have a name

What I want please is some VBA that will delete any duplicate Names that match the same date

16/3/18 John
16/3/18 John Delete
16/318 Jill
21/3/18 Jack
21/3/18 Jack Delete

Any help will be most welcome


EDIT: Sorry forget to mention. its the whole row that i need deleting
 
Last edited by a moderator:

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
In 2007 version

If Data is in Column A & B

Select Whole Data

Tab DATA --> Remove Duplicates

In The Box Select Column A & Column B --> OK

Done
 
Upvote 0
IF macro is required

Sub RemoveDuplicates()

ActiveSheet.Range("$A$2:$B$6").RemoveDuplicates Columns:=Array(1, 2), Header _
:=xlNo
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,907
Messages
6,122,183
Members
449,071
Latest member
cdnMech

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