Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Range selection with R1C1

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Range selection with R1C1

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Range selection with R1C1

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Range selection with R1C1

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Range selection with R1C1

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 947
Default Range selection with R1C1

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,440
Default Range selection with R1C1

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
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
help on Converting R1C1 to A1 and A1 to R1C1..tia sa2 temp Excel Discussion (Misc queries) 3 September 13th 07 08:31 AM
help on Converting R1C1 to A1 and A1 to R1C1..tia sa2 temp Excel Worksheet Functions 3 September 13th 07 08:31 AM
Narrow Range based on Selection in Another Range David Excel Discussion (Misc queries) 3 July 1st 07 05:12 PM
Identifying a selection of a selection of a range swimfast Excel Worksheet Functions 1 March 1st 07 02:51 AM
Range Selection cfspahn24 Excel Discussion (Misc queries) 3 April 14th 06 01:29 PM


All times are GMT +1. The time now is 04:46 PM.

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

About Us

"It's about Microsoft Excel"