Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting 10 cells downwards
Hi,
I'm pretty sure that this is an easy topic but I have been looking all over for a way to do this and cannot find it. I am copying data from one spreadsheet to another and I asking the Macro to find a certain title in the first spreadsheet and then select and copy the following 10 cells down. I currently have in: Range(Selection, Selection.End(xlDown)).Select but the problem is that there is a blank row in the range I'm trying to copy and therefore each time I run this command it only goes down by two cells instead of ten. And I'm unable to select a cell reference ie ("A1:A10").select as the infomation could be in different cells each time I run the code. Any advice would be much appreciated. Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting 10 cells downwards
hi,
try something like this... Range(Selection, Selection.offset(10,0)).Select lookup the offset property in vb help for more info. regards FSt1 " wrote: Hi, I'm pretty sure that this is an easy topic but I have been looking all over for a way to do this and cannot find it. I am copying data from one spreadsheet to another and I asking the Macro to find a certain title in the first spreadsheet and then select and copy the following 10 cells down. I currently have in: Range(Selection, Selection.End(xlDown)).Select but the problem is that there is a blank row in the range I'm trying to copy and therefore each time I run this command it only goes down by two cells instead of ten. And I'm unable to select a cell reference ie ("A1:A10").select as the infomation could be in different cells each time I run the code. Any advice would be much appreciated. Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting 10 cells downwards
How 'bout:
Sub Macro1() ' Macro1 Macro ' Macro recorded 9/6/2006 by Jim May ' ActiveCell.Range("A1:A10").Select End Sub Jim " wrote in message ups.com: Hi, I'm pretty sure that this is an easy topic but I have been looking all over for a way to do this and cannot find it. I am copying data from one spreadsheet to another and I asking the Macro to find a certain title in the first spreadsheet and then select and copy the following 10 cells down. I currently have in: Range(Selection, Selection.End(xlDown)).Select but the problem is that there is a blank row in the range I'm trying to copy and therefore each time I run this command it only goes down by two cells instead of ten. And I'm unable to select a cell reference ie ("A1:A10").select as the infomation could be in different cells each time I run the code. Any advice would be much appreciated. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Selecting multiple cells, I can't see the cells highlighted | Excel Discussion (Misc queries) | |||
How to change shade of cells when selecting multiple cells | Excel Discussion (Misc queries) | |||
By selecting cells adjacent to cells tally sheet | Excel Worksheet Functions | |||
selecting cells | Excel Discussion (Misc queries) | |||
selecting cells | Excel Discussion (Misc queries) |