Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 109
Default How Do I list all range names in a worksheet

I have a spreadsheet with over 1,000 range names. 90% are not valid anymore
I woul like to list all the range names thes be able to have the vba code go
through this list and delet all the ones that I tag as non needed

thanks
--
Helping Is always a good thing
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default How Do I list all range names in a worksheet

I found this in VBA help files.
Sub nms()
Set nms = ActiveWorkbook.Names
Set wks = Worksheets(1)
For r = 1 To nms.Count
wks.Cells(r, 2).Value = nms(r).Name
wks.Cells(r, 3).Value = nms(r).RefersToRange.Address
Next
End Sub

"QuietMan" wrote:

I have a spreadsheet with over 1,000 range names. 90% are not valid anymore
I woul like to list all the range names thes be able to have the vba code go
through this list and delet all the ones that I tag as non needed

thanks
--
Helping Is always a good thing

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default How Do I list all range names in a worksheet

Get the (free) Name Manager:

http://www.jkp-ads.com/OfficeMarketPlaceNM-EN.asp
at jkp's Application Development Service

--
Regards,
Tom Ogilvy



"QuietMan" wrote:

I have a spreadsheet with over 1,000 range names. 90% are not valid anymore
I woul like to list all the range names thes be able to have the vba code go
through this list and delet all the ones that I tag as non needed

thanks
--
Helping Is always a good thing

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 109
Default How Do I list all range names in a worksheet

Thanks, good enough to get me started
--
Helping Is always a good thing


"JLGWhiz" wrote:

I found this in VBA help files.
Sub nms()
Set nms = ActiveWorkbook.Names
Set wks = Worksheets(1)
For r = 1 To nms.Count
wks.Cells(r, 2).Value = nms(r).Name
wks.Cells(r, 3).Value = nms(r).RefersToRange.Address
Next
End Sub

"QuietMan" wrote:

I have a spreadsheet with over 1,000 range names. 90% are not valid anymore
I woul like to list all the range names thes be able to have the vba code go
through this list and delet all the ones that I tag as non needed

thanks
--
Helping Is always a good thing

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
MAKE A LIST OF NAMES FROM REPEATED NAMES IN THE SAME WORKSHEET r.kordahi Excel Discussion (Misc queries) 2 January 3rd 09 08:10 AM
Created list of worksheet names but need list to be hyperlinked to maijiuli Excel Programming 6 September 10th 07 06:44 PM
macro to take worksheet names and create dynamic list/range maijiuli Excel Programming 4 August 1st 07 08:56 PM
Selecting range in list of range names depending on a cell informa Courreges Excel Discussion (Misc queries) 2 June 19th 06 10:59 AM
copy range on every worksheet (diff names) to a master worksheet (to be created) Bernie[_2_] Excel Programming 2 September 22nd 04 03:30 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"