ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   list of named ranges (https://www.excelbanter.com/excel-discussion-misc-queries/208972-list-named-ranges.html)

rolando

list of named ranges
 
can I export a list of defined ranges from 1 workbook to another ?

Jim Thomlinson

list of named ranges
 
Not easily. You could write a macro to do it but that might be more work than
it is worth...

The Name Manager download might make the task a bit easier....
http://www.oaltd.co.uk/MVP/
--
HTH...

Jim Thomlinson


"rolando" wrote:

can I export a list of defined ranges from 1 workbook to another ?


Gary''s Student

list of named ranges
 
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
--
Gary''s Student - gsnu200811


"rolando" wrote:

can I export a list of defined ranges from 1 workbook to another ?


rolando

list of named ranges
 
thanx
this macro works with slight modifications to the ranges
regards
roland

"Gary''s Student" wrote:

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
--
Gary''s Student - gsnu200811


"rolando" wrote:

can I export a list of defined ranges from 1 workbook to another ?



All times are GMT +1. The time now is 11:35 PM.

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