Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save erajanraja24/24e27fda604f2b32f8f0cd3fd3ec4067 to your computer and use it in GitHub Desktop.
Save erajanraja24/24e27fda604f2b32f8f0cd3fd3ec4067 to your computer and use it in GitHub Desktop.
VBA to remove duplicates in an unknown range for specified columns
Sub check()
Set Rng = ThisWorkbook.Sheets(1).UsedRange
Rng.RemoveDuplicates Columns:=Array(1, 2), Header:=xlYes
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment