How to replace range names with cell references in Excel?
When working with named ranges in Excel, you might find them useful for readability and formula management. However, there are situations where you may want to remove range names and restore actual cell references, especially when sharing files, troubleshooting, or standardizing templates. In this article, we will walk through different ways to replace named ranges with their corresponding cell references in Excel.
Replace range names with cell references by VBA code
Quickly and easily replace range names with cell references by Kutools for Excel
For example, in this worksheet, I will name range A2:A6 as saleprice, and name B2 as discount, and then using both the range name in a formula to calculate the new price. See screenshots:
After following the quick tricks, the range name will be replaced with cell reference as shown as below:
Replace range names with cell references by VBA code
Using VBA to replace formula’s range names with cell references, you can get it done step by step as follows:
1. Select the range containing the formulas you want to replace their names with cell references.
2. Press Alt + F11 to open a new Microsoft Visual Basic for applications window will display, then, click Insert > Module, and copy nad paste the following codes in the module:
VBA code: Replace range names with Absolute reference
Sub AbsoleteNamesWithRelativeRefs()
'Updateby Extendoffice
Dim Rng As Range
Dim WorkRng As Range
Dim xName As Name
On Error Resume Next
xTitleId = "KutoolsforExcel"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
Set WorkRng = WorkRng.SpecialCells(xlCellTypeFormulas)
For Each Rng In WorkRng
For Each xName In ThisWorkbook.Names
If InStr(Rng.Formula, xName.Name) > 0 Then
Rng.Formula = VBA.Replace(Rng.Formula, xName.Name, VBA.Replace(VBA.Replace(xName.RefersTo, "=", ""), "$", ""))
End If
Next
Next
End Sub
VBA code: Replace range names with relative reference
Sub ReplaceNamesWithRelativeRefs()
'Updateby Extendoffice
Dim Rng As Range
Dim WorkRng As Range
Dim xName As Name
On Error Resume Next
xTitleId = "KutoolsforExcel"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
Set WorkRng = WorkRng.SpecialCells(xlCellTypeFormulas)
For Each Rng In WorkRng
For Each xName In ThisWorkbook.Names
If InStr(Rng.Formula, xName.Name) > 0 Then
Rng.Formula = VBA.Replace(Rng.Formula, xName.Name, VBA.Replace(xName.RefersTo, "=", ""))
End If
Next
Next
End Sub
3. Then press F5 key to run the code, a dialog displays for selecting a range to replace. See screenshot:
4. Then click OK. and all of the selected formula range names have been replaced.
Quickly and easily replace range names with cell references by Kutools for Excel
While doing this manually or through VBA can be time-consuming and error-prone, Kutools for Excel provides a one-click solution to simplify the entire process. If you have Kutools for Excel, its Convert Name to Reference Range utility will help you replace range names with cell references quickly and easily.
1. Please apply this utility by clicking Kutools > Name Tools > Convert Name to Reference Range.
2. A dialog box is displayed, click Range tab and then select the range you want to replace with cell references from the Base Range. Then, click Replace button. See screenshot:
3. Another prompt box will be displayed to tell you the number of modified formulas and unchanged formulas, click OK, and then the range names in the selected rang have been replaced with cell references.
🔚 Conclusion
Whether you're dealing with a few formulas or an entire workbook, replacing named ranges with actual cell references is a great way to improve transparency, compatibility, and ease of collaboration.
- For advanced users, VBA provides a flexible and programmable solution to automate the replacement process.
- For everyone else, Kutools for Excel offers the fastest and most user-friendly way to complete the task in just a few clicks—no coding or formula editing required.
By choosing the method that best fits your workflow, you can efficiently clean up your formulas and ensure your spreadsheets remain easy to understand and maintain. If you're interested in exploring more Excel tips and tricks, our website offers thousands of tutorials to help you master Excel.
Relative Article:
Change cell reference in formulas to range names in Excel
Best Office Productivity Tools
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.





- 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