A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Links and Linking
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Scope of Names of Cell Reference



 
 
Thread Tools Display Modes
  #1  
Old August 8th, 2004, 01:54 AM
Le Chaud Lapin
external usenet poster
 
Posts: n/a
Default Scope of Names of Cell Reference

So as I understand it, a *name* in any worksheet of a particular
workbook will have workbook-wide scope, whether you want it to or not.

In other words, if you have three worksheets, WS1, WS3, and WS3, all
in WB1, you had better make sure that you use different names for cell
ranges in each of the worksheets even though what you chose to call
the row and column headings in each of them be the same - using the
name of of the worksheet in a cell specification does not help.

If this is true, it is rather annoying.

-Chaud Lapin-
  #2  
Old August 8th, 2004, 07:07 AM
JE McGimpsey
external usenet poster
 
Posts: n/a
Default Scope of Names of Cell Reference

That's not correct. You can have worksheet level names as well as
workbook level names.

One way to create a worksheet level name is to prefix the name with the
sheet name when you enter it in the Name Box on the Formula Bar. So
instead of entering

myname

enter

WS1!myname

for sheet WS1.

myname will still refer to the workbook level name in other sheets, but
within WS1, it will refer to the worksheet name.

In article ,
(Le Chaud Lapin) wrote:

So as I understand it, a *name* in any worksheet of a particular
workbook will have workbook-wide scope, whether you want it to or not.

In other words, if you have three worksheets, WS1, WS3, and WS3, all
in WB1, you had better make sure that you use different names for cell
ranges in each of the worksheets even though what you chose to call
the row and column headings in each of them be the same - using the
name of of the worksheet in a cell specification does not help.

If this is true, it is rather annoying.

  #3  
Old August 8th, 2004, 10:21 PM
Le Chaud Lapin
external usenet poster
 
Posts: n/a
Default Scope of Names of Cell Reference

JE McGimpsey wrote in message ...
That's not correct. You can have worksheet level names as well as
workbook level names.

One way to create a worksheet level name is to prefix the name with the
sheet name when you enter it in the Name Box on the Formula Bar. So
instead of entering

myname

enter

WS1!myname

for sheet WS1.

myname will still refer to the workbook level name in other sheets, but
within WS1, it will refer to the worksheet name.


Looks to me like scoping of names at worksheet vs. workbook level only
works for names that are explicitly defined, not labels that Excel
uses for inference. Seems like it gets confused about labels, whether
there are prefix with worsheet scoping operator (!) or not.

That the case?

-Chaud Lapin-
  #4  
Old August 8th, 2004, 10:53 PM
JE McGimpsey
external usenet poster
 
Posts: n/a
Default Scope of Names of Cell Reference

No. XL isn't confused at all, but the interface may seem inconsistent...

If you use a designator for a worksheet level name that is not also a
workbook level name, you can create the worksheet level name in the
Name box using

Sheet1!myrng

Once a workbook level name is defined, you can only define a worksheet
name with the same designator explicitly in Insert/Name/Define dialog
(or using VBA).

I suspect that this is a "feature" - since the Name box can be used to
both define a name and select a range defined by the name, it may be a
design decision to disallow potentially inadvertent overwriting of
existing workbook-level names. Alternatively, it may have been a
screw-up. However, it's quite consistent.

In article ,
(Le Chaud Lapin) wrote:

Looks to me like scoping of names at worksheet vs. workbook level only
works for names that are explicitly defined, not labels that Excel
uses for inference. Seems like it gets confused about labels, whether
there are prefix with worsheet scoping operator (!) or not.

That the case?

  #5  
Old August 9th, 2004, 01:02 AM
Bill Manville
external usenet poster
 
Posts: n/a
Default Scope of Names of Cell Reference

Le Chaud Lapin wrote:
Seems like it gets confused about labels, whether
there are prefix with worsheet scoping operator (!) or not.

That the case?


That's how it looks to me.
If you can, avoid the use of labels.

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
why is Excel assuming absolute cell reference K. Georgiadis General Discussion 4 July 5th, 2004 04:54 AM
Reference cell in Active Window-possible? Simon Worksheet Functions 4 May 2nd, 2004 04:23 PM
Reference a workbook based on a cell reference douga Worksheet Functions 1 February 17th, 2004 06:21 AM
Cell reference in formulae from text in another cell Gareth Bateamn Worksheet Functions 2 November 16th, 2003 10:22 PM
Cell Reference Question Anders S Worksheet Functions 2 November 14th, 2003 01:41 PM


All times are GMT +1. The time now is 04:37 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.