Giovanni03
New Member
- Joined
- May 23, 2023
- Messages
- 33
- Office Version
- 365
- 2021
- Platform
- Windows
Hello Everyone!
I currently have a code that I'm using to delete duplicate rows, i believed it was working but running a lot of test on my file and of course I found that its not deleting all of the duplicate data. Its working just not 100%. I'm hoping you guys could assist me with this code and see how I can improve it so I can truly delete all duplicate rows.
My Sheet has 14 Columns(A-N). The main place the duplicated data will be in is from column A to D (First 4 columns).
Here's the code that I'm using.
I currently have a code that I'm using to delete duplicate rows, i believed it was working but running a lot of test on my file and of course I found that its not deleting all of the duplicate data. Its working just not 100%. I'm hoping you guys could assist me with this code and see how I can improve it so I can truly delete all duplicate rows.
My Sheet has 14 Columns(A-N). The main place the duplicated data will be in is from column A to D (First 4 columns).
Here's the code that I'm using.
VBA Code:
Sub DeleteRows()
With ActiveSheet
Set Rng = Range("A2", Range("N2").End(xlDown))
Rng.RemoveDuplicates Columns:=Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14), Header:=xlYes
End With
End Sub