KutoolsforOffice — One Suite. Five Tools. Get More Done.February Sale: 20% Off

Remove duplicate rows from table in Word document (Full Guide)

AuthorSunLast modified

Duplicate rows in a Word table can make your document confusing, unprofessional, and harder to analyze—especially when dealing with copied data, imported reports, or survey results. Unfortunately, Microsoft Word does not provide a built-in “Remove Duplicates” feature for tables like Excel does.
The good news? You still have several reliable ways to clean up duplicate rows in Word. Below are three practical methods, from beginner-friendly to advanced automation, each with clear, step-by-step instructions.

Remove duplicate rows from table

Remove duplicate rows from table in Word

Conclusion


Method 1: Remove Duplicate Rows by Using Excel

Since Microsoft Excel is designed for data management, the most reliable way to handle duplicates is to briefly move your table into Excel and then bring it back.

  1. Copy the Table:
    In Word, hover over your table and click the crosshair icon at the top-left to select the entire table. Press Ctrl + C.
    copy the table from word
  2. Paste into Excel:
    Open a blank Excel workbook, select cell A1, and press Ctrl + V.
  3. Remove Duplicates in Excel:
    • Highlight the data range.
    • Go to the Data tab in the top ribbon.
    • Click on Remove Duplicates in the DataTools group.
    • Ensure all columns are checked and click OK.
      Remove Duplicates in Excel
    • Excel will display how many duplicate rows were removed.
      Excel will display how many duplicate rows were removed
  4. Transfer Back:
    Copy the cleaned data in Excel, go back to your Word document, delete the old table, and press Ctrl + V to paste the unique rows.
Advantages
  • Very accurate
  • No programming required
  • Works well for large tables
Limitations
  • Only works with one table at a time
  • Requires switching between Word and Excel

Method 2: Remove Duplicate Rows By using VBA code (From one or all tables)

If you frequently work with large Word tables and want an in-document automation, VBA is an option. This method compares rows and deletes duplicates directly inside Word.

This VBA code allows you to remove duplicate rows from a specific table or from all tables in the current Word document, keeping only the first occurrence of each unique row.

⚠️ Tip: Always back up your document before running VBA code.
  1. Press Alt + F11 to open the Microsoft Visual Basic for Applications window.
  2. Click Insert > Module to create a new module. Copy and paste the following VBA code into the module window.
    Public Sub DeleteDuplicateRowsClean()
        Dim xTable As Table
        Dim xDic As Object
        Dim i As Long, j As Long
        Dim xStr As String
    
        If ActiveDocument.Tables.Count = 0 Then
            MsgBox "There is no table in this file", vbInformation, "Kutoolsfor word"
            Exit Sub
        End If
    
        Set xDic = CreateObject("Scripting.Dictionary")
        Application.ScreenUpdating = False
        If Selection.Information(wdWithInTable) Then
            ProcessTable Selection.Tables(1), xDic
        Else
            For i = 1 To ActiveDocument.Tables.Count
                ProcessTable ActiveDocument.Tables(i), xDic
                xDic.RemoveAll
            Next i
        End If
    
        Application.ScreenUpdating = True
        MsgBox "Complete!", vbInformation
    End Sub
    
    
    Private Sub ProcessTable(targetTable As Table, dic As Object)
        Dim r As Long
        Dim rowText As String
    
        For r = targetTable.Rows.Count To 1 Step -1
            rowText = targetTable.Rows(r).Range.Text
            If dic.Exists(rowText) Then
                targetTable.Rows(r).Delete
            Else
                dic.Add rowText, True
            End If
        Next r
    End Sub
          
  3. Close the code window, do one of the following options:
    • To remove duplicates from a specific table:
      Click anywhere inside the target table.
    • To remove duplicates from all tables:
      Make sure the cursor is not inside any table.
  4. Press Alt + F8, select the DeleteDuplicateRowsClean macro, and click Run.

Result:
Duplicate rows are automatically removed from the selected table or from all tables in the document.

Note: Above code is case sensitive, if you want to remove duplicate rows in case insensitive, you can use below code:
Public Sub DeleteDuplicateRowsIgnoreCase()
    Dim xTable As Table
    Dim xDic As Object
    Dim i As Long

    If ActiveDocument.Tables.Count = 0 Then
        MsgBox "There are no tables", vbInformation, "Kutoolsfor word"
        Exit Sub
    End If
    Set xDic = CreateObject("Scripting.Dictionary")
    xDic.CompareMode = 1

    Application.ScreenUpdating = False

    If Selection.Information(wdWithInTable) Then
        ProcessTable Selection.Tables(1), xDic
    Else
        For i = 1 To ActiveDocument.Tables.Count
            xDic.RemoveAll
            ProcessTable ActiveDocument.Tables(i), xDic
        Next i
    End If

    Application.ScreenUpdating = True
    MsgBox "complete", vbInformation
End Sub

Private Sub ProcessTable(targetTable As Table, dic As Object)
    Dim r As Long
    Dim rowText As String
    For r = targetTable.Rows.Count To 1 Step -1
        rowText = targetTable.Rows(r).Range.Text
        If dic.Exists(rowText) Then
            targetTable.Rows(r).Delete
        Else
            dic.Add rowText, True
        End If
    Next r
End Sub
    

Method 3: Remove Duplicate Rows / Columns Using Kutools for Word (From One or All Tables)

If you are looking for the fastest and most user-friendly way to remove duplicate rows in Word tables, Kutools for Word is the ideal solution. Unlike manual methods or VBA scripts, Kutools provides a feature that allows you to clean data from a single table or all tables in the document with just a few clicks. No coding, no copying to Excel, and no complex setup—making it especially suitable for users who frequently work with large or multiple tables and want accurate results instantly.

After downloading and installing Kutools for Word, please do with the following steps:

  1. Go to Kutools Plus tab, and then click Table > Delete Blank Rows/Columns to open the dialog box.
    click Delete Blank Rows/Columns feature
  2. In the Delete Blank or Duplicate Rows/Columnsin Table dialog box, specify the following options:
    1. Choose the scope (Look in)
      In the Look in drop-down list, select one of the following options:
      • Selected table(s) – Removes duplicate rows only from the tables you have selected.
      • All tables in active document – Removes duplicate rows from all tables in the current document.
    2. Specify the delete type, select Row or Column you want to delete.
    3. Select Duplicate row / column to indicate you want to remove duplicated rows or columns.
    4. Set optional options
      • Case sensitive (optional):
        Enable this if you want Kutools to treat text with different letter cases as different values.
      • Delete blank rows (optional):
        Check this option if you also want to remove empty rows at the same time.
    5. Click OK.
      specify the options in the dialog box

Result:
Kutools will instantly scan the specified table(s) and remove duplicate rows or columns you specified.
Remove Duplicate Rows / Columns Using Kutools for Word

Advantages
  • Extremely fast
  • Works with one, selected or all tables
  • No VBA or Excel required
  • Ideal for non-technical users
Kutools for Word

Kutools for Word provides powerful table tools to remove duplicate or blank rows with just a few clicks—no coding, no Excel, and no complex setup required.


Conclusion

Removing duplicate rows from tables in Word can be challenging because Word does not offer a built-in deduplication tool. However, by choosing the right method, you can clean your data efficiently and accurately.

  • Using Excel is a reliable option when working with a single table and handling large amounts of data, especially if you prefer a familiar, no-code approach.
  • Using VBA code is suitable for advanced users who want to automate the process and remove duplicate rows from one or all tables, but it requires technical knowledge and macro-enabled documents.
  • Using Kutools for Word is the fastest and most user-friendly solution, allowing you to remove duplicate rows from one or all tables with just a few clicks, without Excel or VBA.

By selecting the method that best matches your skill level and document complexity, you can keep your Word tables clean, accurate, and easy to manage—saving time and avoiding repetitive manual work.