i = 1
Cells(i,"A").value = "Name"
Cells(i,"B").value = "RefersTo"
For Each nme In ActiveWorkbook.Names
i = i + 1
Cells(i, "A").Value = nme.Name
Cells(i, "B").Value = nme.RefersTo
Next nme
Chip: Good Post. What if you want to return a subset of the range names?
I have a workbook that has about 100 names in it. I need to extract a
subset, say all names beginning with "INPUT_", and use them in a loop to
clear data or autofill.
Dim NM As Name
For Each NM In ThisWorkbook.Names
If StrComp(Left(NM.Name, Len("INPUT_")), "INPUT_", vbTextCompare) = 0
Then
' name begins with "INPUT_". Do something with NM
End If
Next NM
End Sub
--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting www.cpearson.com
(email on the web site)
This free addin allows you to filter names by many different criteria,
You can also list the filtered names on a worksheet, edit them and then
re-import them into one or more workbooks
Charles
______________________
Decision Models
FastExcel 2.3 now available
Name Manager 4.0 now available www.DecisionModels.com
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.