ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Named Ranges (https://www.excelbanter.com/excel-programming/353911-named-ranges.html)

paul johnson

Named Ranges
 
I have a spreadsheet using 100 plus named ranges.
Is there a quick way to document all these ranges?

Many Thanks

Paul



Gary Keramidas

Named Ranges
 
maybe something like this. this will list them in the immediate window

Sub name_ranges3() ' dumps all named ranges
Dim nm As Name
For Each nm In ThisWorkbook.Names
Debug.Print nm.Name
Debug.Print Range(nm).Name
Next nm
End Sub

--


Gary


"paul johnson" wrote in message
...
I have a spreadsheet using 100 plus named ranges.
Is there a quick way to document all these ranges?

Many Thanks

Paul




ben

Named Ranges
 
do you mean just make a list?

put this code in the workbook with your names


Sub getnames()
Application.EnableEvents = False
Application.ScreenUpdating = False
Dim wkb As Workbook
Dim cou As Integer
Set wkb = Workbooks.Add
wkb.Sheets(1).Cells(1, 1).Activate
For cou = 1 To ThisWorkbook.Names.Count
ActiveCell = ThisWorkbook.Names(cou).Name
ActiveCell.Offset(1, 0).Activate
Next
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub



--
When you lose your mind, you free your life.
Ever Notice how we use '' for comments in our posts even if they aren''t
expected to go into the code?


"paul johnson" wrote:

I have a spreadsheet using 100 plus named ranges.
Is there a quick way to document all these ranges?

Many Thanks

Paul




Tom Ogilvy

Named Ranges
 
go to a blank worksheet
Insert=Name=Paste. . .

select the paste list button.

--
Regards,
Tom Ogilvy

"paul johnson" wrote in message
...
I have a spreadsheet using 100 plus named ranges.
Is there a quick way to document all these ranges?

Many Thanks

Paul





Don Guillett

Named Ranges
 
Does this help?

Sub listnamesandrefersto()
For Each n In ThisWorkbook.Names
lr = Cells(Rows.Count, "a").End(xlUp).Row + 1
Cells(lr, 1) = n.Name
Cells(lr, 2) = Right(n.RefersTo, Len(n.RefersTo) - 1)
Next
End Sub


--
Don Guillett
SalesAid Software

"paul johnson" wrote in message
...
I have a spreadsheet using 100 plus named ranges.
Is there a quick way to document all these ranges?

Many Thanks

Paul




paul johnson

Named Ranges
 
Many Thanks again Tom


Regards Paul



"Tom Ogilvy" wrote in message
...
go to a blank worksheet
Insert=Name=Paste. . .

select the paste list button.

--
Regards,
Tom Ogilvy

"paul johnson" wrote in message
...
I have a spreadsheet using 100 plus named ranges.
Is there a quick way to document all these ranges?

Many Thanks

Paul







Dave Peterson

Named Ranges
 

You may want to get Jan Karel Pieterse's (with Charles Williams and Matthew
Henson) Name Manager:

You can find it at:
NameManager.Zip from http://www.oaltd.co.uk/mvp

paul johnson wrote:

I have a spreadsheet using 100 plus named ranges.
Is there a quick way to document all these ranges?

Many Thanks

Paul


--

Dave Peterson


All times are GMT +1. The time now is 10:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com