你需要把你的数据含标题粘贴到A列运行一下函数就ok
Sub 删除重复值()
Range("A1:A" & Range("A65536").End(xlUp).Row).Copy Range("B1")
"复制A列数据到B列
ActiveSheet.Range("B:B").RemoveDuplicates Columns:=1, Header:=xlYes
"删除B列重复值
Dim rng As Range
"声明rng为单元格变量
For Each rng In Range("B2:B" & Range("B65536").End(xlUp).Row)
rng.Offset(0, 1) = Application.WorksheetFunction.CountIf(Range("A:A"), rng)
Range("C1") = "重复情况"
Next
" 用for each函数遍历B列有数据的单元格,用offset偏离函数在C列求重复次数
End Sub