list of named ranges

  • Thread starter Thread starter rolando
  • Start date Start date
R

rolando

can I export a list of defined ranges from 1 workbook to another ?
 
If you mean Named ranges, then if we have an active workbook with named
ranges and another open workbook called Book2:

Sub qwerty()
Dim n As Name
For Each n In ActiveWorkbook.Names
t1 = n.Name
t2 = n.RefersTo
Workbooks("Book2").Names.Add Name:=t1, RefersTo:=t2
Next
End Sub

This will only work if the sheet names are the same in both workbooks
 
thanx
this macro works with slight modifications to the ranges
regards
roland
 

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