Sub qc()
a = InputBox("请输入列字母", "信息", "A")
'如果想要去重A列,输入A,去重B列,输入B
Select Case a
Case "A": b = 1
Case "B": b = 2
Case "C": b = 3
Case "D": b = 4
Case "E": b = 5
Case "F": b = 6
End Select
i = Range(a & "65536").End(xlUp).Row
For s = 1 To i
For ss = i To s + 1 Step -1
If Cells(ss, b) = Cells(s, b) Then
Cells(ss, b).Delete shift:=xlUp
End If
Next ss
Next s
End Sub
vba单元格列去重复(可选择列值)
最新推荐文章于 2023-09-24 21:25:06 发布