Named Ranges
I guess it boils down to what you consider the name.
If you create a worksheet level name on Sheet1 named ABC and another worksheet
level name on Sheet2 also named ABC, do they share the same name?
Roger Govier wrote:
Hi Dave
Quite right, but in my eyes those are different named ranges.
Epinn was asking about the same name - which is what I was answering -
and in that case you cannot use the same name to point to 2 different
ranges.
--
Regards
Roger Govier
"Dave Peterson" wrote in message
...
If you include the sheet name in the definition, you can have sheet
level names
that all use that same ABC name.
While on Sheet1:
Insert Name|Define
Names in workbook: sheet1!ABC
refers to: $a$1
While on Sheet 99 (notice the space):
Insert Name|Define
Names in workbook: 'sheet 99'!ABC (notice the apostrophes)
refers to: $C$12 (it can refer to the same address
or not)
I can refer to those range names on sheet7653 by:
=sheet1!ABC+'sheet 99'!ABC
And it'll work fine.
Roger Govier wrote:
Hi Epinn
Can someone confirm this is not possible please?
That is correct.
You can't have the same name for 2 different ranges, either on the
same
sheet or different sheets.
You can have the same range on multiple sheets adopt the same name
provided there is only an exclamation "!" in front of the range, not
Sheet!
--
Regards
Roger Govier
"Epinn" wrote in message
...
Thank you all for your response. What I want is very simple, nothing
to
do with VBA.
Basically, I was trying to have the *same name* for A1:A10 on two
sheets
(within the same workbook) respectively. Jim and Biff gave me the
answer.
I don't think I can name A1:A10 on Sheet1 as "ABC" and then also name
B1:B10 on Sheet2 as "ABC" as well. I used insertnamedefine and I
also
use the Sheet# to qualify the range, but no luck.
Can someone confirm this is not possible please?
The Name Manager may come in handy one of these days. Thanks Dave.
Epinn
"Epinn" wrote in message
...
Note: This is a continuation of a previous discussion which you
don't
really need.
Dave,
I did an experiment. I opened a brand new workbook. On Sheet1, I
selected A1:A10 and defined it with a name "Range123." Then, on
Sheet2,
I did the same. As soon as I did that, "Range123" from Sheet1 no
longer
existed. So, I don't really understand how the user can have the
same
named ranges within one workbook? You know what, I even took out the
reference to Sheet and tried to force in just the cell reference; but
Excel won't let me. What am I missing here? Wonder if *two*
workbooks
are involved when we talk about "same name?"
Sounds like you were talking about VBA. I didn't pick this up.
Look forward to your comments.
Epinn
--
Dave Peterson
--
Dave Peterson
|