How to quickly get address of named range in Excel?
Range name is a common feature that we usually used in our workbook, but, here, I wonder if there was a way to show the full address of a named range. For example, I have a named range called “domains” in a worksheet, and the range address would be $A$2:$A$9. How could I quickly get the address of a ranged name in Excel?
- Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
- More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
- Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
- Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
- Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
- Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
- More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.
Supposing, I have a range data which has the range name “domains” as following screenshot shown, and now, I can extract the address A2:A9 of the range name as following steps:
1. Enter this long formula =ADDRESS(ROW(domains),COLUMN(domains))&":"&ADDRESS(ROW(domains)+ROWS(domains)-1,COLUMN(domains)+COLUMNS(domains)-1) into a blank cell, see screenshot:
Note: In the above formula, domains is the range name that I want to use, you can change it to your own range name.
2. Then press Enter key, and you will get the cell address of the ranged name.
If you want to get the address of the range name including the sheet name, the following VBA code can do you a favor.
1. Hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.
2. Click Insert > Module, and paste the following code in the Module Window.
VBA code: get address of ranged name in Excel
Function NameRefersTo(ByVal sName As String) As String 'Update 20140904 On Error Resume Next NameRefersTo = Application.ActiveWorkbook.Names(sName).RefersTo End Function
3. Then save and close this code, go back to your worksheet, in a blank cell, please enter this formula =Namerefersto("domains") into a blank cell, see screenshot:
Note: In the above formula, domains is the range name that you want to use, you can change it to your need, and you must put the name between in quotes.
4. Press Enter key, and it returns the sheet name with the address for your specified ranged name.