Skip to main content

Kutools for Office β€” One Suite. Five Tools. Get More Done.

How to quickly find and remove all rows with errors in Excel?

Author Sun Last modified

Managing error values in Excel can be a frequent task, especially when errors disrupt your data analysis or calculations. Error values such as #DIV/0!, #N/A, #VALUE! can occur for various reasonsβ€”such as referencing invalid data, incorrect formulas, or importing data from external systems. Efficiently finding and removing all rows or cells that contain these errors is important for keeping your spreadsheets clean and reliable. This tutorial offers a comprehensive introduction to several practical methods for identifying and clearing error-filled cells and rows, using both built-in Excel features, formulas, VBA code, and specialized tools.


Find and remove all cells with errors by Go To Special

Excel's Go To Special function allows you to quickly select all cells containing formula errors within a chosen range or on an entire worksheet. This method is best for sheets where you need to clear cell content regardless of which row they're in.

1. Select your target range or the whole worksheet as needed, then press Ctrl + G to open the Go To dialog box.

2. Click Special to launch the Go To Special dialog. Here, check the Formulas option, and within Formula options, ensure only the Errors checkbox is marked. This makes sure only error cells are selected.
doc find remove errors1

3. Click OK, and Excel will select every cell with a formula error in your range. You can then press the Delete key to clear their contents.
all cells with errors are selected, press Delete key to remove the errors

Note: This only removes cell values, not entire rows, which is useful if you want to preserve other data in the row.

Applicable scenario: Quickly cleaning up formula errors in specific columns (not always suitable if you need to remove entire error-containing rows).


Find and remove all cells with errors by an advanced tool

For a more streamlined and user-friendly approach, you can use the Select Cells with Error Value tool in Kutools for Excel. This feature allows you to immediately select all error values within your chosen range, making removal straightforwardβ€”especially when dealing with large or complex sheets.

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Itegarate with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...

1. Choose the range you wish to scan for errors, then click Kutools > Select > Select Cells with Error Value.
click Select Cells with Error Value feature of kutools

2. All error cells will be highlighted instantly. Click OK to close the reminder dialog, and press Delete to clear the error cells’ values.
all error cells have been selected
press Delete key to remove the error cells

Practical tip: This method helps save significant time if your sheet contains scattered error cells across multiple columns.

Remove all rows with errors with VBA

In cases where you need to delete every row containing at least one error cell, a VBA macro is a flexible and powerful solution. This approach is recommended for large datasets or repetitive tasks, allowing you to automate error row removal and reduce manual effort.

1. Press Alt + F11 to open the Microsoft Visual Basic for Applications editor. In the window, select Insert > Module to open a blank code module.

2. Copy and paste the following VBA code into the module window:

VBA: Remove error rows

Sub DeleteErrorRows()
Dim xWs As Worksheet
Dim xRg As Range
Dim xFNum As Integer

   Set xWs = Application.ActiveSheet
Application.ScreenUpdating = False
    On Error Resume Next
    With xWs
        Set xRg = .UsedRange
        xRg.Select
        For xFNum = 1 To xRg.Columns.count
            With .Columns(xFNum).SpecialCells(xlCellTypeFormulas, xlErrors)
                .EntireRow.Delete
            End With
        Next xFNum
    End With
Application.ScreenUpdating = True
End Sub

3. Press F5 to run the code. All rows containing error values will be deleted automatically.

Error reminder: Before running VBA: Please back up your file, as this action is irreversible. If your worksheet contains formulas referencing other sheets, test on a sample copy first.

Find and remove all rows with errors with Super Filter

The Super Filter utility within Kutools for Excel streamlines filtering and removing rows with errors. This method is suitable when you need to apply specific error types or combine multiple criteria while filtering your dataβ€”especially helpful in complex tables with various error types.

After free installing Kutools for Excel (30-day free trial), follow these steps:

1. Highlight your target data range, then go to Kutools Plus > Super Filter to open the filter pane.
click Kutools Plus > Super Filter

2. In the Super Filter pane, set the filtering criterion:

a) Choose the column header for error checking.
b) Select Error from the secondary drop-down menu.
c) Select Equals from the comparison drop-down.
d) Choose All Error in the final drop-down.
add the criterion in the super filter pane

3. Click Ok to apply your criterion, then click Filter. The tool will display only those rows containing error values.
click Filter to filter rows with errors

Error rows will now be isolated.
the rows with errors in column are filtered

4. To remove these rows, select them individually, right-click, and choose Delete Row in the context menu.
select the filtered rows and click Delete Row

Once deleted, click the Clear button in Super Filter to return to your full dataset.
Click Clear button in the Super Filter to display other rows

Tip: You can use specific error types like #NAME? or #DIV/0! by customizing the filter settings.
 filter #NAME? error or #DIV/0 or other specific error only by kutools

Super Filter also supports multifaceted criteria that are not found in native Excel filters. Click for details.


Excel Formula: Use ISERROR, ISERR, ISNA, or IFERROR to identify and remove error rows

Using Excel formulas in a helper column is a practical solution for detecting rows containing error values, especially if you want to decide which errors should prompt row removal. This method provides transparency and flexibility, making it easy to audit which rows are flagged and manually or automatically filter and delete them.

Applicable scenario: When you want granular control over which errors are flagged, or to keep audit information before deletion. This is ideal for tables where errors may be spread across multiple columns.

1. Add a new helper column at the rightmost edge (e.g., column D) and enter the following formula in cell D2 to check for errors across column B:

=ISERROR(B2)

Replace B2 with the cell reference where errors may occur. For other error types, you can use:

=ISERR(B2) (Detects any error except #N/A)
=ISNA(B2) (Detects #N/A errors only)
=IFERROR(B2,"Error") (Returns custom label for errors)

2. Drag the formula down to fill the helper column for all rows in your dataset. Each cell will show TRUE if an error exists, FALSE if not.

3. Use Excel's filter: Click the filter drop-down in your helper column and filter to show rows where the formula is TRUE. Delete these rows as needed, then remove the helper column once finished.

Practical tip: You can expand the formulas to scan multiple columns (e.g., =OR(ISERROR(B2),ISERROR(C2))) and flag rows where any cell has an error. If you use IFERROR, you can also display a custom message beside errors for easier review before removal.

Caution: If your data includes intentional errors for other analysis reasons, review flagged rows before deleting.


Conditional Formatting: Visually Highlight Errors for Easy Row Removal

Conditional Formatting in Excel enables you to automatically highlight cells or rows that contain error values, making them easy to spot for review or deletion. This method is useful when you need visual cues before deciding which data to keep or remove, and it can complement other approaches for enhanced accuracy.

Scenario: Ideal for quality control in large datasets where visual inspection is needed, or before sharing data with others.

  1. Select the range where you want to highlight errors.
  2. Go to Home > Conditional Formatting > New Rule > Use a formula to determine which cells to format.
  3. Enter this formula to target errors (e.g. for column B):
    =ISERROR(B2)
    Adjust reference as necessary for your sheet.
  4. Click Format, choose a highlight color, then click OK to apply.
  5. All error cells will be highlighted; you can now manually review and remove entire rows as desired.

Practical tip:  Always review highlighted cells before deleting rows, especially if some errors are expected or temporarily present during data entry.


Summing up and troubleshooting: When working with error values in Excel, always choose a method suited to your dataset's size, complexity, and whether you intend to remove cells or entire rows. Use helper columns and the filter function for customizable error detection, conditional formatting for visual cues, and advanced tools when handling large or irregular tables. Before executing mass deletions, back up your file! If unexpected errors occur (e.g., formulas not detecting errors, rows not deleting), double-check cell references and ensure all relevant columns are included in your criteria. Kutools solutions offer extended functionality for tricky scenarios, but even built-in Excel features can help keep your sheets tidy and professional.

Other Operations (Articles) Related To Filtering

Filter data based on a list
This tutorial provides tricks on filtering data based on a given list data in Excel.

Filter data contains asterisk
As we know, we use asterisk mask to stand any characters when you filter data, but how can you do if you want to filter data which contains asterisk mask? Now this article introduces the method about data filtering if containing asterisk or other special characters in Excel.

Filter data with criteria or wildcard
If you want to filter data with multiple criteria, how can you do? This tutorial is talking about how to set multiple criteria and filter data in Excel.

Best Office Productivity Tools

πŸ€– Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions…
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!

All Kutools add-ins. One installer

Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.

Excel Word Outlook Tabs PowerPoint
  • All-in-one suite β€” Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
  • One installer, one license β€” set up in minutes (MSI-ready)
  • Works better together β€” streamlined productivity across Office apps
  • 30-day full-featured trial β€” no registration, no credit card
  • Best value β€” save vs buying individual add-in