突然的叮当猫 - 2011-10-30 1:21:00
用excel时,发现如下这个宏,不知道是不是病毒,请解答,谢谢
Sub RemoveSame()
Dim col1, col2 As String
col1 = "A"
col2 = "B"
Dim row1, row2, i, j As Integer
Dim finded As Boolean
row1 = ActiveSheet.Range(col1 & "65536").End(xlUp).row
row2 = ActiveSheet.Range(col2 & "65536").End(xlUp).row
For i = 1 To row1
finded = False
If (Range(col1 & i) <> "") Then
For j = 1 To row2
If (Range(col1 & i) = Range(col2 & j)) Then
Range(col2 & j) = ""
finded = True
End If
If (finded) Then
Range(col1 & i) = ""
End If
Next
End If
Next
End Sub
用户系统信息:Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; QQDownload 677; .NET CLR 2.0.50727)
networkedition - 2011-10-31 9:36:00
将excel文件压缩跟帖上传。
© 2000 - 2024 Rising Corp. Ltd.