Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default Nested Ranges?

Is it possible to a range within a range? For example to select a range
made up of two names I use the following:

Range("BINFilStart:colBend").Offset(0, 1).Select

However, BINFilStart should be offset and colBend should not. To meet
that need Ive tried a few things along the lines of:

Range("range(""BINFilStart"".Offset(0, 1)):colBend").Select



Nothing has worked and in this case I get runtime error 1004 Method
'Range' of object '_Global' failed. So far I can't find
anything in my references on nesting ranges.

Maybe I need a new approach?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,311
Default Nested Ranges?

Try this:

Range(Range("BINFilStart").Offset(0, 1).Address & ":colBend").Select

Regards,
Paul

wrote in message
oups.com...
Is it possible to a range within a range? For example to select a range
made up of two names I use the following:

Range("BINFilStart:colBend").Offset(0, 1).Select

However, BINFilStart should be offset and colBend should not. To meet
that need Ive tried a few things along the lines of:

Range("range(""BINFilStart"".Offset(0, 1)):colBend").Select



Nothing has worked and in this case I get runtime error 1004 Method
'Range' of object '_Global' failed. So far I can't find
anything in my references on nesting ranges.

Maybe I need a new approach?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Nested Ranges?

Range takes two arguments. The second one is optional. The range is made up
of the rectangle where each cell is one of the corners... For example

Range(Range("A1"), Range("D5"))
is the same as
Range("A1:D5")

So for your problem...
Range(Range("BINFilStart").Offset(0, 1), Range("colBend")).Select

--
HTH...

Jim Thomlinson


" wrote:

Is it possible to a range within a range? For example to select a range
made up of two names I use the following:

Range("BINFilStart:colBend").Offset(0, 1).Select

However, BINFilStart should be offset and colBend should not. To meet
that need Ive tried a few things along the lines of:

Range("range(""BINFilStart"".Offset(0, 1)):colBend").Select



Nothing has worked and in this case I get runtime error 1004 Method
'Range' of object '_Global' failed. So far I can't find
anything in my references on nesting ranges.

Maybe I need a new approach?


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default Nested Ranges?

Thanks Paul, that works perfect
Robert


PCLIVE (RemoveThis) wrote:
Try this:

Range(Range("BINFilStart").Offset(0, 1).Address & ":colBend").Select

Regards,
Paul

wrote in message
oups.com...
Is it possible to a range within a range? For example to select a range
made up of two names I use the following:

Range("BINFilStart:colBend").Offset(0, 1).Select

However, BINFilStart should be offset and colBend should not. To meet
that need Ive tried a few things along the lines of:

Range("range(""BINFilStart"".Offset(0, 1)):colBend").Select



Nothing has worked and in this case I get runtime error 1004 Method
'Range' of object '_Global' failed. So far I can't find
anything in my references on nesting ranges.

Maybe I need a new approach?


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default Nested Ranges?

Thanks Jim, that is an excelent description, and examples of nesting
ranges :)


Jim Thomlinson wrote:
Range takes two arguments. The second one is optional. The range is made up
of the rectangle where each cell is one of the corners... For example

Range(Range("A1"), Range("D5"))
is the same as
Range("A1:D5")

So for your problem...
Range(Range("BINFilStart").Offset(0, 1), Range("colBend")).Select

--
HTH...

Jim Thomlinson


" wrote:

Is it possible to a range within a range? For example to select a range
made up of two names I use the following:

Range("BINFilStart:colBend").Offset(0, 1).Select

However, BINFilStart should be offset and colBend should not. To meet
that need Ive tried a few things along the lines of:

Range("range(""BINFilStart"".Offset(0, 1)):colBend").Select



Nothing has worked and in this case I get runtime error 1004 Method
'Range' of object '_Global' failed. So far I can't find
anything in my references on nesting ranges.

Maybe I need a new approach?



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 set up variable data ranges in nested functions Tom@AML Excel Worksheet Functions 3 July 10th 07 12:04 AM
nested if based on nested if in seperate sheet. how? scouserabbit Excel Worksheet Functions 5 March 2nd 07 05:03 PM
How to include ranges of data in a nested EXCEL formula Jim McCord Excel Discussion (Misc queries) 3 December 19th 06 12:35 AM
Can COUNTIF be nested to search two ranges Jimbob Excel Worksheet Functions 4 November 1st 06 06:23 PM
UPDATED - Referencing named Ranges within a Nested IF formula JTinAtlanta Excel Worksheet Functions 1 July 29th 05 11:46 PM


All times are GMT +1. The time now is 03:07 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"