selecting more than one cell

B

Bradly

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.
 
F

FSt1

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
 
R

Rick Rothstein

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top