Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to set up variable data ranges in nested functions | Excel Worksheet Functions | |||
nested if based on nested if in seperate sheet. how? | Excel Worksheet Functions | |||
How to include ranges of data in a nested EXCEL formula | Excel Discussion (Misc queries) | |||
Can COUNTIF be nested to search two ranges | Excel Worksheet Functions | |||
UPDATED - Referencing named Ranges within a Nested IF formula | Excel Worksheet Functions |