Formula Errors

How to Remove Excel Defined Names Without Creating #REF Errors

Khadija KhanKhadija Khan Nov 11, 2026 868 views

Question details

The user wants to delete defined names in the Excel Name Manager without causing #REF! errors in existing formulas.

Product
Microsoft Excel
Device & OS
not provided
Scenario
Cleaning up a workbook by removing unused or unnecessary defined names from the Name Manager.
Observed behavior
Deleting defined names directly causes formulas that reference those names to break and return #REF! errors.
Before you start

Before modifying defined names or converting formulas, trace the dependents of the named ranges to understand where they are used in your workbook.

Solution 1Recommended

Convert Named Ranges to Cell References Using a VBA Macro

Use a VBA macro to automatically search through your formulas and replace defined names with their actual cell references before you delete them.

If you have a large workbook with multiple defined names, manually finding and replacing them can be tedious. Using a VBA macro allows you to systematically replace the defined names with standard cell references across all sheets.

Once the names are converted into absolute references, you can safely remove the names from the Name Manager without triggering any #REF! errors.

1
Open the VBA Editor

Press Alt + F11 to launch the Visual Basic for Applications (VBA) editor in Excel.

2
Insert a New Module

Click on 'Insert' in the top menu and select 'Module' to create a blank workspace for your code.

3
Input the Conversion Macro

Paste a standard VBA script designed to loop through cells with formulas and replace the Name property with its corresponding RangeAddress.

4
Run the Macro

Press F5 or click 'Run' to execute the macro. Check your formulas to verify the defined names have been replaced with direct cell addresses.

5
Delete the Defined Names

Press Ctrl + F3 to open the Name Manager, select the newly unused names, and click 'Delete'.

Convert Named Ranges to Cell References Using a VBA Macro
Backup Recommended: Always save a copy of your workbook before running VBA macros that modify formulas in bulk.
Manage Spreadsheet Formulas Easily

Easily Manage Defined Names and Formulas in WPS Spreadsheet

WPS Spreadsheet provides an intuitive Name Manager to organize, edit, and safely evaluate defined names. With powerful formula tracking capabilities, you can convert named ranges efficiently without breaking your workbook.

  1. 1. Open the Spreadsheet: Launch WPS Spreadsheet and open your workbook containing the defined names.
  2. 2. Navigate to Formulas: Click on the 'Formulas' tab in the top ribbon menu.
  3. 3. Access the Name Manager: Click on 'Name Manager' to view a comprehensive list of all defined names and the cell ranges they point to.
  4. 4. Update and Manage: Use the 'Refers to' field to identify targets, update your formulas accordingly, and delete any unused names safely.
Fully compatible with Microsoft Excel (.xlsx, .xls) files and formulasIntuitive Name Manager interface for tracking cell dependenciesAdvanced Find and Replace tool for managing complex formulasFree and lightweight office suite for daily spreadsheet tasks
microsoft office alternative - wps office

Frequently Asked Questions

Why does a #REF! error appear when I delete a defined name?

The #REF! error happens because a formula is actively using the defined name as part of its calculation. When you delete the name from the Name Manager, Excel no longer knows which cells the formula is trying to access.

Can I easily find out which formulas are using a specific defined name?

Yes. You can use the Find feature (Ctrl + F) to search for the specific text of the defined name across the workbook. Alternatively, you can use the 'Trace Dependents' feature in the Formulas tab to visually see which cells rely on that named range.

Will replacing named ranges with cell references alter my formula's calculation?

No. Replacing a defined name with its exact absolute cell reference (for example, replacing 'TaxRate' with '$D$5') will calculate the exact same mathematical result.

What is the shortcut to open the Name Manager?

You can quickly open the Name Manager in Excel and WPS Spreadsheet by pressing Ctrl + F3 on your keyboard.