Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 30
Default Defining identical names that represent different ranges of cells

Is there a way to define, within the same workbook, identical names that
relate to different ranges, depending on the sheet they belong to.
For instance : The name "Area" would refer to cells Sheet1!A1:A2 when
invoked from within Sheet1, or to cells Sheet2!B1:B2 when invoked from within
Sheet2.
This would let identical formulas provide different results according to the
sheet they reside in.

Such a definition is quite straightforward using VBA, something like :
ThisWorkbook.Worksheets(1).Names.Add RefersTo:="=A1:A2", Name:="Area"
ThisWorkbook.Worksheets(2).Names.Add RefersTo:="=B1:B2", Name:="Area"

But I'm actually looking for a direct Excel method, not using VBA.

Thanks for any idea
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 301
Default Defining identical names that represent different ranges of cells

Include the sheet tab in the definition of the range:
Insert/Name/Define:
Sheet1!Area refers to
Sheet1!A1:A1

Sheet2!Area refers to
Sheet2!B2:B2
etc.

"Bernard" wrote in message
...
Is there a way to define, within the same workbook, identical names that
relate to different ranges, depending on the sheet they belong to.
For instance : The name "Area" would refer to cells Sheet1!A1:A2 when
invoked from within Sheet1, or to cells Sheet2!B1:B2 when invoked from

within
Sheet2.
This would let identical formulas provide different results according to

the
sheet they reside in.

Such a definition is quite straightforward using VBA, something like :
ThisWorkbook.Worksheets(1).Names.Add RefersTo:="=A1:A2", Name:="Area"
ThisWorkbook.Worksheets(2).Names.Add RefersTo:="=B1:B2", Name:="Area"

But I'm actually looking for a direct Excel method, not using VBA.

Thanks for any idea



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 30
Default Defining identical names that represent different ranges of ce

Thanks, The simpler, the better ! I should have guessed that !
By the way this sould be documented in the on line help.

"Bob Umlas" wrote:

Include the sheet tab in the definition of the range:
Insert/Name/Define:
Sheet1!Area refers to
Sheet1!A1:A1

Sheet2!Area refers to
Sheet2!B2:B2
etc.

"Bernard" wrote in message
...
Is there a way to define, within the same workbook, identical names that
relate to different ranges, depending on the sheet they belong to.
For instance : The name "Area" would refer to cells Sheet1!A1:A2 when
invoked from within Sheet1, or to cells Sheet2!B1:B2 when invoked from

within
Sheet2.
This would let identical formulas provide different results according to

the
sheet they reside in.

Such a definition is quite straightforward using VBA, something like :
ThisWorkbook.Worksheets(1).Names.Add RefersTo:="=A1:A2", Name:="Area"
ThisWorkbook.Worksheets(2).Names.Add RefersTo:="=B1:B2", Name:="Area"

But I'm actually looking for a direct Excel method, not using VBA.

Thanks for any idea




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question for Bob Phillips re Splitting Names from Cells Paul Sheppard Excel Discussion (Misc queries) 8 August 3rd 05 09:00 AM
Sp[litting Names from Cells Paul Sheppard Excel Discussion (Misc queries) 1 July 31st 05 08:52 AM
Defining Ranges Steve Excel Worksheet Functions 5 May 28th 05 07:41 AM
Drop down defining content of a range of cells philm13 Links and Linking in Excel 5 March 25th 05 03:31 PM
Help adding text values Texas-DC_271 Excel Worksheet Functions 7 January 15th 05 11:14 PM


All times are GMT +1. The time now is 09:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"