New Tool Radar

AI for Data & Spreadsheets

How to Remove Error Rows with Power Query in Excel

Find and remove error rows in Power Query, but check each error against the source before it is dropped.

Schematic illustration for How to Remove Error Rows with Power Query in Excel: three numbered steps - From Table/Range; Filter to errors; Fix or remove the rows.

A Power Query step that cannot convert a value leaves an error in that cell, and a table with errors will not load cleanly. Errors should be fixed in the source where possible, and only removed when the row itself is genuinely unusable, with the removal recorded.

Prerequisites

  • Excel with Power Query
  • A query that shows errors
  • A copy of the source file, so the original stays untouched.

Steps

  1. Open the query in the Power Query Editor and look for the word Error in any cell.
  2. Filter the column to show only errors, and read each error row against the source file.
  3. Fix the value in the source file where it is a typing error, then refresh the query.
  4. If a row cannot be fixed, use Home, Remove Rows, Remove Errors, and note how many rows were removed.
  5. Click Close and Load, then check the row count against the source.

Worked example: Fictional import after removing error rows

The practice table below is a fictional five-row import after errors were removed. Each amount is a sale value, and the total is their sum. The table below is fictional practice material, with fictional values. It is the expected result, worked out by hand, not a run of any tool.

Row Amount
Row 1 22.00
Row 2 31.50
Row 3 18.75
Row 4 27.25
Row 5 44.00
Total 143.50

Expected result. Five clean rows loaded, no errors, and the amounts add to 143.50.

Limits

  • Removing error rows deletes data, so record how many rows were removed and why.
  • An error can mark a real value that needs a different type, so check the source before removing the row.

Sources

See all