logo
search
VBA & Macro Problems

How to Fix Excel Cannot Find Do_End Error

Maira MehtabMaira Mehtab Sep 22, 2026 869 views

Question details

The user needs to resolve an error prompt stating 'Cannot find Do_End' that appears while working with an Excel workbook.

Product
Microsoft Excel
Device & OS
not provided
Scenario
Opening, closing, or executing automated actions within an Excel workbook that relies on specific macros or defined names.
Observed behavior
Excel displays a 'Cannot find Do_End' message because a defined name, macro reference, or automatic action is pointing to a missing or invalid procedure.
Before you start

Before modifying your Name Manager or macros, ensure you have enabled the Developer tab in your Excel ribbon so you can properly inspect VBA references and add-ins.

Solution 1Recommended

Remove or Correct Invalid Defined Names via Name Manager

Use the built-in Name Manager tool to locate the missing 'Do_End' reference and either delete it or correct its path.

The most common cause of this error is a defined name that points to a macro or cell range that no longer exists in the workbook.

1
Open Formulas Tab

Launch Microsoft Excel, open the affected workbook, and navigate to the 'Formulas' tab on the top ribbon menu.

2
Access Name Manager

Click on 'Name Manager' located within the Defined Names group.

3
Locate the Do_End Reference

Scroll through the list of defined names and look for any entry named 'Do_End' or containing it in its reference.

4
Delete or Edit

Select the invalid 'Do_End' defined name. Click 'Delete' to remove it completely if it is no longer needed, or click 'Edit' to point it to the correct workbook location.

Tip: Pay special attention to auto-close or auto-save macros, as these often trigger defined name errors when closing the application.
Manage Defined Names in WPS Spreadsheets

Easily Resolve Macro and Formula Errors with WPS Office

WPS Office provides a highly compatible and user-friendly interface to manage defined names, inspect formulas, and run VBA macros, making it easy to fix workbook errors like 'Cannot find Do_End'.

  1. 1. Open File in WPS Spreadsheets: Launch WPS Office and open your problematic .xlsx or .xlsm workbook.
  2. 2. Go to Formulas: Navigate to the 'Formulas' tab located on the top navigation ribbon.
  3. 3. Open Name Manager: Click the 'Name Manager' button to bring up a list of all defined references in your document.
  4. 4. Delete Invalid Entries: Find the 'Do_End' item, select it, and click 'Delete' to instantly resolve the error message.
Free, lightweight, and fast alternative to Microsoft ExcelFully compatible with Microsoft Office formats including .xlsx, .xls, and .xlsmBuilt-in Name Manager to quickly locate, edit, and remove invalid referencesExcellent support for complex formulas, macros, and VBA scripts
microsoft office alternative - wps office

Frequently Asked Questions

What does the 'Cannot find Do_End' error mean in Excel?

This error means that Excel is attempting to execute a procedure, macro, or action labeled 'Do_End', but it cannot locate it. This usually happens when a macro is deleted, renamed, or moved, but the defined name referencing it is left behind.

Why does this error appear as soon as I open or close my Excel file?

If the missing 'Do_End' macro is tied to an automated workbook event (like an auto-open or auto-close script) or a startup add-in, Excel will trigger the error immediately upon launching or exiting the file.

Can I simply ignore this error prompt?

While you can dismiss the prompt, ignoring it is not recommended. An unresolved missing reference can cause workbook instability, slow down calculation speeds, and disrupt other functional macros within your document.