Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Range Selection

Hey,
I know that what I,ve given below is wrong and that exactly is the reason
why I'm asking your help.
So, how do I correct this statement below?
Range("Cells(R1, C1 + 2):Cells(R1, C1 + 16)").Copy
I need to select a range of cells, But with reference
anyone out there???

--
Baapi
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 279
Default Range Selection

You need a good book try http://j_walk.com

Quote marks convert your address to a string

Range("A4")is ok but
Range(Cells(1,4)) can not have quotes in it

Range(Cells(R1, C1 + 2),Cells(R1, C1 + 16)).Copy

also not a colin but a comma between top left and bottom right cells of the
range

What are R1 and C1?? Really bad names for variables
in Cells( x,y)
x is the number of the row
y is the number of the column

looks like you may mean to use offset - loook it up in help

"Baapi" wrote:

Hey,
I know that what I,ve given below is wrong and that exactly is the reason
why I'm asking your help.
So, how do I correct this statement below?
Range("Cells(R1, C1 + 2):Cells(R1, C1 + 16)").Copy
I need to select a range of cells, But with reference
anyone out there???

--
Baapi

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default Range Selection

As a guess you are using the active cell? If that is the case the try

range(activecell.offset(0, -1), activecell.offset(0, 16)).copy
--
HTH...

Jim Thomlinson


"Baapi" wrote:

Hey,
I know that what I,ve given below is wrong and that exactly is the reason
why I'm asking your help.
So, how do I correct this statement below?
Range("Cells(R1, C1 + 2):Cells(R1, C1 + 16)").Copy
I need to select a range of cells, But with reference
anyone out there???

--
Baapi

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
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
Excel VBA - Range(Selection, Selection.End(xlDown)).Name issue. jonH Excel Programming 3 June 7th 04 09:13 PM
Creating range name for a range selection Mervyn Thomas Excel Programming 1 January 26th 04 05:18 PM
Selection of range me[_4_] Excel Programming 1 September 10th 03 05:05 PM


All times are GMT +1. The time now is 01:23 AM.

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"