回覆列表
  • 1 # 壹柒捌精品

    excel中假設在A列需要找到相同數值的單元格,在B1輸入以下公式

    =IF(COUNTIF($A$1:A1,A1)>1,"重複","0")。

    然後往下拖,只要是重複,後面就會顯示“重複”兩個字,顯示0的就是不重複,一目瞭然。

    2、Ctrl+H替換視窗,把重複兩個字替換為空(就是“替換為”那裡什麼也不輸入),全部替換。

    Dim rCell As Range, rRng As Range, dRng As Range

    On Error Resume Next

    Application.ScreenUpdating

    = False

    Set rRng = Range("A1:A" & Range("A65536").End(xlUp).Row)

    rRng.AdvancedFilter

    Action:=xlFilterInPlace, unique:=True

    For Each rCell In rRng

    If

    rCell.EntireRow.Hidden

    = True Then

    If dRng Is Nothing Then

    Set dRng =

    rCell.EntireRow

    Else

    Set dRng = Application.Union(dRng, rCell.EntireRow)

    End If

    End If

    Next

    If Not dRng Is Nothing Then

    dRng.Delete

    ActiveSheet.ShowAllData

    Application.ScreenUpdating

    = True

    End Sub

  • 中秋節和大豐收的關聯?
  • 教堂婚禮要注意哪些細節六大要點須知?