![]() |
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. |
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. |
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. |
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. |
All times are GMT +1. The time now is 04:46 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com