How to Remove Excel Defined Names Without Creating #REF Errors
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 modifying defined names or converting formulas, trace the dependents of the named ranges to understand where they are used in your workbook.
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.
Press Alt + F11 to launch the Visual Basic for Applications (VBA) editor in Excel.
Click on 'Insert' in the top menu and select 'Module' to create a blank workspace for your code.
Paste a standard VBA script designed to loop through cells with formulas and replace the Name property with its corresponding RangeAddress.
Press F5 or click 'Run' to execute the macro. Check your formulas to verify the defined names have been replaced with direct cell addresses.
Press Ctrl + F3 to open the Name Manager, select the newly unused names, and click 'Delete'.

Manually Find and Replace Defined Names
Locate and replace defined names with cell references manually, which is ideal for workbooks with only a few named ranges.
Utilize a Name Manager Add-in
Use specialized third-party tools like JKPieterse's Name Manager add-in to easily identify and handle defined names.
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. Open the Spreadsheet: Launch WPS Spreadsheet and open your workbook containing the defined names.
- 2. Navigate to Formulas: Click on the 'Formulas' tab in the top ribbon menu.
- 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. Update and Manage: Use the 'Refers to' field to identify targets, update your formulas accordingly, and delete any unused names safely.

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.




