Skip to main content

How to remove empty rows and columns from tables in Word?

Author Amanda Li Last modified

Empty rows and columns in tables can make your Word document look cluttered and unorganized. This tutorial will show you several ways to efficiently remove all empty rows and columns from tables in a Word document.

Whether you prefer to do it manually, use VBA code, or employ a one-click solution, these methods will help you clean up your tables and enhance the overall appearance of your document.


Manually remove all empty rows and columns from tables

Microsoft Word does not have a quick option to remove empty rows and columns, so you must manually select and delete them one by one.

  1. Select the empty row or column you want to delete.

    An empty row and an empty column are selected

  2. Under the Table Tools, click the Layout tab.

    The Layout tab on the ribbon

  3. In the Rows & Columns group, click Delete Rows or Delete Columns.

    Delete Rows or Delete Columns option


Remove all empty rows and columns from tables with one click

Kutools for Word offers a highly efficient solution to remove all empty rows and columns from tables in your document. With just one click, the Kutools for Word Delete Rows/Columns utility allows you to quickly remove all empty rows or columns from either all or selected tables in your document, saving time and effort.

Kutools for Word, equipped with AI πŸ€–, offers over 100 handy features to simplify your tasks.

After installing Kutools for Word, follow these steps:

  1. Click Kutools Plus > Table > Delete Blank Rows/Columns.

    Delete Blank Rows/Columns option on the Kutools Plus tab on the ribbon

  2. The Delete Blank or Duplicate Rows/Columns in Table dialog box will appear. In the Look in section, select the scope where you want to remove blank row or columns, which can be selected tables or all tables in the active document. Then:
    • Check the Row option and the Blank row option to remove empty rows.
    • Or, check the Column option and the Blank column option to remove empty columns.
    Delete Blanks or Duplicate Rows/Columns in Table dialog box with the Row option selected Delete Blanks or Duplicate Rows/Columns in Table dialog box with the Column option selected
    Tip: If you want to delete both blank rows and columns, repeat the operation twice.
  3. A confirmation dialog will pop up, showing the number of tables processed. Click OK to close it. The blank rows and columns have now been removed from the tables.

    Confirmation dialog

Kutools for Word is the ultimate Word add-in that streamlines your work and boosts your document processing skills. Get It Now!

Remove all empty rows and columns from tables by using VBA code

The Macro function in Word offers a more convenient method to remove all empty rows and columns from tables in a document. Follow the steps below to remove them efficiently:

  1. Press Alt + F11 to open the Microsoft Visual Basic for Applications window.
  2. Click Module under the Insert tab, and copy and paste the following VBA code into the Module window.
    Sub DeleteEmptyTablerowsandcolumns()
    Application.ScreenUpdating = False
    Dim Tbl As Table, cel As Cell, i As Long, n As Long, fEmpty As Boolean
    With ActiveDocument
    For Each Tbl In .Tables
    n = Tbl.Columns.Count
    For i = n To 1 Step -1
    fEmpty = True
    For Each cel In Tbl.Columns(i).Cells
    If Len(cel.Range.Text) > 2 Then
    fEmpty = False
    Exit For
    End If
    Next cel
    If fEmpty = True Then Tbl.Columns(i).Delete
    Next i
    Next Tbl
    End With
    With ActiveDocument
    For Each Tbl In .Tables
    n = Tbl.Rows.Count
    For i = n To 1 Step -1
    fEmpty = True
    For Each cel In Tbl.Rows(i).Cells
    If Len(cel.Range.Text) > 2 Then
    fEmpty = False
    Exit For
    End If
    Next cel
    If fEmpty = True Then Tbl.Rows(i).Delete
    Next i
    Next Tbl
    End With
    Set cel = Nothing: Set Tbl = Nothing
    Application.ScreenUpdating = True
    End Sub
  3. Click the Run button Run button or press F5 to execute the VBA code and apply it.

Demo: Remove blank rows and columns from tables in Word

Discover the Kutools / Kutools Plus tab in this video from Kutools for Word. Enjoy 100+ features and permanently free AI utilities. Download now!

Tip. If you want to remove blank rows from Excel sheet, the Delete Blank Rows utility of Kutools for Excel can help you.

Best Office Productivity Tools

Kutools for Word - Elevate Your Word Experience with Over 100 Remarkable Features!

πŸ€– Kutools AI Features: AI Assistant / Real-Time Assistant / Super Polish (Preserve Format) / Super Translate (Preserve Format) / AI Redaction / AI Proofread...

πŸ“˜ Document Mastery: Split Pages / Merge Documents / Export Selection in Various Formats (PDF/TXT/DOC/HTML...) / Batch Convert to PDF...

✏ Contents Editing: Batch Find and Replace across Multiple Files / Resize All Pictures / Transpose Table Rows and Columns / Convert Table to Text...

🧹 Effortless Clean: Sweap away Extra Spaces / Section Breaks / Text Boxes / Hyperlinks / For more removing tools, head to the Remove group...

βž• Creative Inserts: Insert Thousand Separators / Check Boxes / Radio Buttons / QR Code / Barcode / Multiple Pictures / Discover more in the Insert group...

πŸ” Precision Selections: Pinpoint Specific Pages / Tables / Shapes / Heading Paragraphs / Enhance navigation with more Select features...

⭐ Star Enhancements: Navigate to Any Location / Auto-Insert Repetitive Text / Toggle Between Document Windows / 11 Conversion Tools...

🌍 Supports 40+ Languages: Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Kutools and Kutools Plus tabs on the Word Ribbon
πŸ‘‰ Want to try these features? Download Kutools for Word now! πŸš€
 

Best Office Productivity Tools

Kutools for Word - 100+ Tools for Word