Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 77
Default NamedRange - Variable Sheet

Is there a way to set a named range, based on the active sheet?

Example:
Range1 =LOOKUP(2,1/('Sheet1'!$B$1:$B$5000<""),ROW('Sheet1'!$B$1:$B$5 000))

I want to be able to set this named ranged, based on the sheet I am in. If
on sheet 2 it would set the range as:
Range1 =LOOKUP(2,1/('Sheet2'!$B$1:$B$5000<""),ROW('Sheet2'!$B$1:$B$5 000))

etc...
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default NamedRange - Variable Sheet

There are 2 types of named ranges. Global and Local. Global named ranges
apply to the entire wokrbook and can be referenced form any sheet. Local
named ranges are defined on one sheet and they apply only to that sheet.

Local named ranges are created by appending the sheet name at the start of
the named range. So something like this

Named range = 'Sheet1'!MyStuff
Reference = 'Sheet1'!$B$1:$B$5000
you refer to it using MyStuff on sheet 1

Named range = 'Sheet2'!MyStuff
Reference = 'Sheet2'!$B$1:$B$5555
you refer to it using MyStuff on sheet 2
--
HTH...

Jim Thomlinson


"Josh O." wrote:

Is there a way to set a named range, based on the active sheet?

Example:
Range1 =LOOKUP(2,1/('Sheet1'!$B$1:$B$5000<""),ROW('Sheet1'!$B$1:$B$5 000))

I want to be able to set this named ranged, based on the sheet I am in. If
on sheet 2 it would set the range as:
Range1 =LOOKUP(2,1/('Sheet2'!$B$1:$B$5000<""),ROW('Sheet2'!$B$1:$B$5 000))

etc...

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
How to Add NamedRange Controls to Worksheets? lijipan Excel Worksheet Functions 0 November 16th 07 04:40 PM
Unhide sheet based on NamedRange? Michael Beckinsale Excel Programming 2 March 17th 06 02:12 PM
Addressing cells in a NamedRange Mike[_51_] Excel Programming 6 May 15th 04 09:13 PM
Cell Reference within NamedRange ExcelMonkey[_12_] Excel Programming 1 January 21st 04 10:37 PM
sum (column 2 of namedrange) Alan Beban[_3_] Excel Programming 2 August 21st 03 10:11 PM


All times are GMT +1. The time now is 01:06 PM.

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"