Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
create named range specific to worksheet
Suppose I have a named range "x" in cell A1 of worksheet Sheet1, and I
copy the contents of Sheet1 to Sheet2. When I then write a formula on Sheet2, "x" still refers to Sheet1!A1, when I want it to refer to Sheet2!A2. In other words, I want each sheet copied from Sheet1 to have its own set of named ranges, defined on that sheet. Can this be done? Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
create named range specific to worksheet
Worksheets("Sheet2").Range("A1").Name = "Sheet2!X"
creates a sheet level name of X -- Regards, Tom Ogilvy wrote in message oups.com... Suppose I have a named range "x" in cell A1 of worksheet Sheet1, and I copy the contents of Sheet1 to Sheet2. When I then write a formula on Sheet2, "x" still refers to Sheet1!A1, when I want it to refer to Sheet2!A2. In other words, I want each sheet copied from Sheet1 to have its own set of named ranges, defined on that sheet. Can this be done? Thanks. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
create named range specific to worksheet
Sub makename()
ActiveSheet.Range("a1").Name = ActiveSheet.Name & "X" End Sub This is universal for all sheets. Unfortunately for you it is not possible to have two or more ranges with same name within one workbook. You can solve this by replacing e.g. sheet1x by sheet2x in your formulas afer copying. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Referring to specific cell in named range in Excel formula | Excel Worksheet Functions | |||
Defining Named Range for Lastrow in a specific column | Excel Discussion (Misc queries) | |||
Selecting specific row/column from a named range | Excel Worksheet Functions | |||
How do I count a named range for a specific word or acronym? | Excel Worksheet Functions | |||
named range not specific to worksheet | Excel Programming |