Sub del_same()
Dim i, j As Integer
For i = 1 To 1200
For j = i + 1 To 1200
If Cells(i, 1) = Cells(j, 1) And Cells(i, 2) = Cells(j, 2) And Cells(i, 3) = Cells(j, 3) And Cells(i, 1).Value <> "" Then
Rows(j).ClearContents’ 这里采用清空内容,如果直接删除,会涉及到表格的重新排序,导致运行缓慢
End If
Next
Next
End Sub
vba 去除重复行
最新推荐文章于 2024-06-10 10:16:08 发布