excel中假设在A列需要找到相同数值的单元格,在B1输入以下公式=IF(COUNTIF($A$1:A1,A1)>1,"重复","0")。然后往下拖,只要是重复,后面就会显示“重复”两个字,显示0的就是不重复,一目了然。如果要删除重复的行,那么继续做完上面的以后,按下面的步骤:1、选中B列复制,再依次点击编辑、选择性粘贴,选中数值,确定。2、Ctrl+H替换窗口,把重复两个字替换为空(就是“替换为”那里什么也不输入),全部替换。3、依旧选中B列,按F5,在跳出窗口的左下角点击定位条件,选择空值,确定。4、依次点击编辑,删除,选择整行,确定。 用vba 删除重复的行。Sub 删除重复行2()。Dim rCell As Range, rRng As Range, dRng As RangeOn Error Resume NextAScreenUpdating = FalseSet rRng = Range("A1:A" & Range("A65536")End(xlUp)Row)rRAdvancedFilter Action:=xlFilterInPlace, unique:=TrueFor Each rCell In rRngIf rCEntireRHidden = True ThenIf dRng Is Nothing ThenSet dRng = rCEntireRowElseSet dRng = AUnion(dRng, rCEntireRow)End IfEnd IfNextIf Not dRng Is Nothing Then dRDeleteActiveSShowAllDataAScreenUpdating = TrueEnd Sub