Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I would like to replicate Range("D8:F8","I8:K8").Select using R1C1 references.
Can I somehow make the Range(Cells(r,c),Cells(r,c)).Select work for a compound range? Thanks |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Not too sure what exactly you want since what you want to replicate
Range("D8:F8","I8:K8").Select is the same as Range("D8:K8").Select (Not a compound range???) If you do want a compound reange then try this union(Range("D8:F8"),Range("I8:K8")).Select or Union(Cells(r,c),Cells(r,c)).Select -- HTH... Jim Thomlinson "Adam1 Chicago" wrote: I would like to replicate Range("D8:F8","I8:K8").Select using R1C1 references. Can I somehow make the Range(Cells(r,c),Cells(r,c)).Select work for a compound range? Thanks |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
But the suggestion below only has two Cells(r,c) which will allow me to
describe a range, but not a compound range. I would need four Cell references (one for the start and end of each range) and that is what doesn't seem to work. thanks "Jim Thomlinson" wrote: Not too sure what exactly you want since what you want to replicate Range("D8:F8","I8:K8").Select is the same as Range("D8:K8").Select (Not a compound range???) If you do want a compound reange then try this union(Range("D8:F8"),Range("I8:K8")).Select or Union(Cells(r,c),Cells(r,c)).Select -- HTH... Jim Thomlinson "Adam1 Chicago" wrote: I would like to replicate Range("D8:F8","I8:K8").Select using R1C1 references. Can I somehow make the Range(Cells(r,c),Cells(r,c)).Select work for a compound range? Thanks |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
So it is a compound range you want then... try this
union(range(cells(r1, c1), cells(r2, c2)), range(cells(r3, c3), cells(r4, c4))).Select It defines two ranges based on RC co-ordinates and unions those 2 ranges together... To see it a little more clearly you could do this dim rng1 as range dim rng2 as range set rng1 = range(cells(r1, c1), cells(r2, c2)) set rng2 = range(cells(r3, c3), cells(r4, c4)) union(rng1, rng2).select -- HTH... Jim Thomlinson "Adam1 Chicago" wrote: But the suggestion below only has two Cells(r,c) which will allow me to describe a range, but not a compound range. I would need four Cell references (one for the start and end of each range) and that is what doesn't seem to work. thanks "Jim Thomlinson" wrote: Not too sure what exactly you want since what you want to replicate Range("D8:F8","I8:K8").Select is the same as Range("D8:K8").Select (Not a compound range???) If you do want a compound reange then try this union(Range("D8:F8"),Range("I8:K8")).Select or Union(Cells(r,c),Cells(r,c)).Select -- HTH... Jim Thomlinson "Adam1 Chicago" wrote: I would like to replicate Range("D8:F8","I8:K8").Select using R1C1 references. Can I somehow make the Range(Cells(r,c),Cells(r,c)).Select work for a compound range? Thanks |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks for your help
"Jim Thomlinson" wrote: So it is a compound range you want then... try this union(range(cells(r1, c1), cells(r2, c2)), range(cells(r3, c3), cells(r4, c4))).Select It defines two ranges based on RC co-ordinates and unions those 2 ranges together... To see it a little more clearly you could do this dim rng1 as range dim rng2 as range set rng1 = range(cells(r1, c1), cells(r2, c2)) set rng2 = range(cells(r3, c3), cells(r4, c4)) union(rng1, rng2).select -- HTH... Jim Thomlinson "Adam1 Chicago" wrote: But the suggestion below only has two Cells(r,c) which will allow me to describe a range, but not a compound range. I would need four Cell references (one for the start and end of each range) and that is what doesn't seem to work. thanks "Jim Thomlinson" wrote: Not too sure what exactly you want since what you want to replicate Range("D8:F8","I8:K8").Select is the same as Range("D8:K8").Select (Not a compound range???) If you do want a compound reange then try this union(Range("D8:F8"),Range("I8:K8")).Select or Union(Cells(r,c),Cells(r,c)).Select -- HTH... Jim Thomlinson "Adam1 Chicago" wrote: I would like to replicate Range("D8:F8","I8:K8").Select using R1C1 references. Can I somehow make the Range(Cells(r,c),Cells(r,c)).Select work for a compound range? Thanks |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Range("D8:F8","I8:K8").Select
Not sure if this is what you want, but one set of quotes gives you two ranges. Range("D8:F8 ,I8:K8").Select -- HTH Dana DeLouis "Adam1 Chicago" wrote in message ... But the suggestion below only has two Cells(r,c) which will allow me to describe a range, but not a compound range. I would need four Cell references (one for the start and end of each range) and that is what doesn't seem to work. thanks "Jim Thomlinson" wrote: Not too sure what exactly you want since what you want to replicate Range("D8:F8","I8:K8").Select is the same as Range("D8:K8").Select (Not a compound range???) If you do want a compound reange then try this union(Range("D8:F8"),Range("I8:K8")).Select or Union(Cells(r,c),Cells(r,c)).Select -- HTH... Jim Thomlinson "Adam1 Chicago" wrote: I would like to replicate Range("D8:F8","I8:K8").Select using R1C1 references. Can I somehow make the Range(Cells(r,c),Cells(r,c)).Select work for a compound range? Thanks |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
If the workbook has R1C1 reference style:
[r8c4:r8c6,r8c9:r8c11].Select -- Kind regards, Niek Otten Microsoft MVP - Excel "Adam1 Chicago" wrote in message ... |I would like to replicate Range("D8:F8","I8:K8").Select using R1C1 references. | | Can I somehow make the Range(Cells(r,c),Cells(r,c)).Select work for a | compound range? | | Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
help on Converting R1C1 to A1 and A1 to R1C1..tia sa2 | Excel Discussion (Misc queries) | |||
help on Converting R1C1 to A1 and A1 to R1C1..tia sa2 | Excel Worksheet Functions | |||
Narrow Range based on Selection in Another Range | Excel Discussion (Misc queries) | |||
Identifying a selection of a selection of a range | Excel Worksheet Functions | |||
Range Selection | Excel Discussion (Misc queries) |