点工具《宏《visul basic 编辑器《 在编辑器里双击你资料所在的工作表,在代码处输入以下内容:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim a, b, c As Double
c = Me.Range("a65536").End(xlUp).Row
For a = 1 To c
For b = a + 1 To c
If Me.Cells(b, 1) = Me.Cells(a, 1) Then
Me.Cells(b, 1).Interior.Color = 0
End If
Next b
Next a
MsgBox "计算完毕!", , "提示"
End Sub