Named Ranges

robfo0

Active Member
Joined
Feb 19, 2002
Messages
281
Does anyone know a quick way to print ALL of the named ranges that i have in my workbook? i need a list of them :)

Thanks
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Try this:

Code:
Sub NameList()
    Dim nm As Name
    
    For Each nm In ActiveWorkbook.Names
        Debug.Print nm.Name
    Next nm

End Sub

This just prints them to the immediate window in the VB editor...you can also have it print to a worksheet.

HTH,

Russell
 
Upvote 0
Get ASAP Utilities freeware add-in at www.asap-utilities.com. It's "Information | List all range names" menu command should do the trick.

It has lots of other features that make it well worth the trip.
This message was edited by Mark W. on 2002-03-22 15:30
 
Upvote 0
Depending on where you want them, the following code should work OK, Names in column A, ranges they refer to in column B. Change to where you want them displayed: -

Public Sub NameAll()

Sheet1.Range("A1").ListNames

End Sub
 
Upvote 0
On 2002-03-22 15:30, Mudface wrote:
Depending on where you want them, the following code should work OK, Names in column A, ranges they refer to in column B. Change to where you want them displayed: -

Public Sub NameAll()

Sheet1.Range("A1").ListNames

End Sub

I like it!
 
Upvote 0

Forum statistics

Threads
1,213,532
Messages
6,114,176
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top