Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Defining Variables with Same Name in Different Worksheets

In a workbook with multiple worksheets, is it possible to define a name that
only applies to that particular worksheet? I would like to use the same
variable name on another worksheet, but for a different set of cells. I had
copied a worksheet to another worksheet in the workbook, and it seemed to do
this for some variable, but not all of them. Where would I enter the
information that indicates a particular variable name only applies to a
specific worksheet.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default Defining Variables with Same Name in Different Worksheets

You have to prefix the range name with the sheet name followed with an
exclamation point.

For example:

Select the range,
Click in the name box (left of the formula bar),
Type:
sheet1!mylist
And hit <Enter

Go to Sheet2, select your range for that sheet, and do the same thing:
sheet2!mylist

Now, when you go to:
<Insert <Name <Define

You'll see the range name on the left side, and the sheet name on the right
side of the "Define Name" window.


--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"mhyzak" wrote in message
...
In a workbook with multiple worksheets, is it possible to define a name
that
only applies to that particular worksheet? I would like to use the same
variable name on another worksheet, but for a different set of cells. I
had
copied a worksheet to another worksheet in the workbook, and it seemed to
do
this for some variable, but not all of them. Where would I enter the
information that indicates a particular variable name only applies to a
specific worksheet.



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
Name Defining Chris Excel Discussion (Misc queries) 2 August 10th 06 03:06 PM
Compare two variables across two worksheets jlcnewyork Excel Worksheet Functions 0 February 14th 06 08:58 PM
VBA defining variables Jeff Excel Discussion (Misc queries) 2 November 3rd 05 11:33 PM
Defining Matt Excel Discussion (Misc queries) 1 July 26th 05 08:13 PM
solver and defining all variables different than one another excel_excel_excel Excel Discussion (Misc queries) 0 July 19th 05 07:38 AM


All times are GMT +1. The time now is 06:44 AM.

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

About Us

"It's about Microsoft Excel"