Answers for "excel vba remove duplicates from each column"

VBA
1

vba code to remove duplicates from a column

Sub removeDuplicate()
 'removeDuplicate Macro
 Columns("A:A").Select
 ActiveSheet.Range("$A$1:$A$117").RemoveDuplicates Columns:=Array(1), _ 
 Header:=xlNo 
 Range("A1").Select
 End Sub
Posted by: Guest on September-21-2020
1

vba code to remove duplicates from a column

Sub dedupe_abcd()
    Dim icol As Long

    With Sheets("Sheet1")   '<-set this worksheet reference properly!
        icol = Application.Match("abcd", .Rows(1), 0)
        With .Cells(1, 1).CurrentRegion
            .RemoveDuplicates Columns:=icol, Header:=xlYes
        End With
    End With
End Sub
Posted by: Guest on September-21-2020

Code answers related to "VBA"

Browse Popular Code Answers by Language