Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default selecting more than one cell

I am trying to write a macro which goes to a certain column in one workbook,
copies numerous rows of data, and pastes the data in another workbook.

How do I select more than one cell at a time? I have seen the Range line
read ("A54:A68") before, but how do I select more than one cell that is not
specified?

For example, I use Control+F to find a particular reference in one workbook.
I use Offset to move down a certain number of rows and over a certain number
of columns. I then want to select the data in the active cell and the next
14 rows, copy the selected data, and paste in another workbook.

I can't use cell references (like "A54:A68"), because the 15-row data
appears at different places within the same column ("A54:A68", "A139:A153",
etc.).

Thanks. Let me know if I need to explain again.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default selecting more than one cell

hi
here is one way. there are a number of others plus variations to this one.

Range(Range("A1"), Range("A1").Offset(15, 12)).Select

adjust the offset part if needed.

regards
FSt1

"Bradly" wrote:

I am trying to write a macro which goes to a certain column in one workbook,
copies numerous rows of data, and pastes the data in another workbook.

How do I select more than one cell at a time? I have seen the Range line
read ("A54:A68") before, but how do I select more than one cell that is not
specified?

For example, I use Control+F to find a particular reference in one workbook.
I use Offset to move down a certain number of rows and over a certain number
of columns. I then want to select the data in the active cell and the next
14 rows, copy the selected data, and paste in another workbook.

I can't use cell references (like "A54:A68"), because the 15-row data
appears at different places within the same column ("A54:A68", "A139:A153",
etc.).

Thanks. Let me know if I need to explain again.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default selecting more than one cell

("A54:A68, A139:A153")

--
HTH...

Jim Thomlinson


"Bradly" wrote:

I am trying to write a macro which goes to a certain column in one workbook,
copies numerous rows of data, and pastes the data in another workbook.

How do I select more than one cell at a time? I have seen the Range line
read ("A54:A68") before, but how do I select more than one cell that is not
specified?

For example, I use Control+F to find a particular reference in one workbook.
I use Offset to move down a certain number of rows and over a certain number
of columns. I then want to select the data in the active cell and the next
14 rows, copy the selected data, and paste in another workbook.

I can't use cell references (like "A54:A68"), because the 15-row data
appears at different places within the same column ("A54:A68", "A139:A153",
etc.).

Thanks. Let me know if I need to explain again.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default selecting more than one cell

I think you will want to use the Resize property. Assuming x and y are your
offset values, then something like this...

ActiveCell.Offset(x, y).Resize(15).Copy

--
Rick (MVP - Excel)


"Bradly" wrote in message
...
I am trying to write a macro which goes to a certain column in one
workbook,
copies numerous rows of data, and pastes the data in another workbook.

How do I select more than one cell at a time? I have seen the Range line
read ("A54:A68") before, but how do I select more than one cell that is
not
specified?

For example, I use Control+F to find a particular reference in one
workbook.
I use Offset to move down a certain number of rows and over a certain
number
of columns. I then want to select the data in the active cell and the
next
14 rows, copy the selected data, and paste in another workbook.

I can't use cell references (like "A54:A68"), because the 15-row data
appears at different places within the same column ("A54:A68",
"A139:A153",
etc.).

Thanks. Let me know if I need to explain again.



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
Paste data of a cell to another cell by just selecting the source lamesakid5810 Excel Programming 2 April 1st 09 08:35 AM
Excel 2007 single cell selecting muliple cell Submit2s Excel Worksheet Functions 1 February 12th 09 04:52 PM
Selecting a cell entry based on cell validation selection Brutalius Excel Worksheet Functions 2 December 17th 08 03:44 AM
Transfer cell values to another cell by selecting button. Gryndar Excel Worksheet Functions 2 November 24th 08 02:21 AM
enter text in cell just by selecting cell dlyon Excel Programming 2 December 15th 07 06:37 PM


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