Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 1 Then For i = 1 To [A65536].End(xlUp).Row If Cells(i, 1) = Target.Value And i <> Target.Row And Cells(Target.Row, 1) <> "" Then Cells(Target.Row, 1) = "" a = MsgBox("数据重复请重新输入", , "提示") End If Next End If End Sub