📜  从列中删除重复项的 vba 代码 - VBA 代码示例

📅  最后修改于: 2022-03-11 14:51:56.934000             🧑  作者: Mango

代码示例2
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