View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Per Jessen Per Jessen is offline
external usenet poster
 
Posts: 1,533
Default Extending a range selection

Hi Mats

I think this is what you are looking for:

Range(Cells(ActiveCell.Row, 1), ActiveCell.End(xlToRight).Offset(1, 0)).Copy

Regards,
Per

"Mats Samson" skrev i meddelelsen
...
Thanks FSt1,
well not exactly, I wanted to select 2 rows and copy them.
However, meanwhile I solved it:
Selection.End(xlToLeft).Range("A1:A2").Select
Range(Selection, Selection.End(xlToRight)).Copy

Thanks anyway
Mats

"FSt1" wrote:

hi
if i understand you correctly, you are somewhere in A column and want to
select 2 rows down and to the end of the data. Assuming you have a solid
block of data, try this....
Range(ActiveCell, ActiveCell.Offset(2, 0).End(xlToRight)).Select

regards
FSt1

"Mats Samson" wrote:

Id like to extend the range selection of the CURRENT row from A column
to 2
(adjacent) rows until End(xlRight) and then copy the selection
I dont seem to get it right having selected 2 rows and trying to
extend the
selection until End(xlRight). Can anybody help with the syntax, please?