How Do I list all range names in a worksheet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top