Forum Discussion
mj05jm
Jan 14, 2023Copper Contributor
Is there a way to delete only one part of the duplicates
Hello! I know that what I'm trying to do can seem a bit strange, but I'm trying to get some data about my bus network, and need a list of stops that's not too big to get data from. I'm trying to ke...
NikolinoDE
Jan 15, 2023Gold Contributor
How to remove all duplicates but keep only one in Excel?
1. Select the data list you need, and click Data > Remove Duplicates.
2. Then in Remove Duplicates dialog, check the column name that you want to remove duplicates from, and if your data has header, check My data has headers option, too.
3. Click OK. And a dialog pops out to tell you how many duplicates have been removed, just close it. And now all duplicates have been remove but keep only one in the list.
Remove all duplicates but keep only one with VBA
Sub RemoveAllDeplicateButOne()
Dim LR As Long: LR = Range("A" & Rows.Count).End(xlUp).Row
ActiveSheet.Range("A1:A" & LR).RemoveDuplicates Columns:=1, Header:=Name
End Sub
...more informations you will find in the upper link.
Hope I was able to help you with this information.
I know I don't know anything (Socrates)