Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- https://excel-egy.com/forum/t4008
- ---------------------------------
- Sub RemoveDuplicates_Method_In_Dynamic_Approach()
- Dim ws As Worksheet, rng As Range, a(), i As Long
- Set ws = ThisWorkbook.Sheets(1)
- Set rng = ws.Range("A4").CurrentRegion
- ReDim a(0 To rng.Columns.Count - 1)
- For i = 0 To rng.Columns.Count - 1: a(i) = i + 1: Next i
- rng.RemoveDuplicates Columns:=(a), Header:=xlYes
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement