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 Selecting a Range of Columns for Variable Rows

Hi

Here's a way:

Dim DestCell As Range
Set DestCell = Worksheets("Sheet2").Range("A2")

For rw = 3 To 17
With Worksheets("Sheet1")
.Range("A" & rw & ":F" & rw).Copy Destination:=DestCell
End With
Set DestCell = DestCell.Offset(1, 0)
Next

Or it can be done with this one-line statement:

Worksheets("Sheet1").Range("A3:F17").Copy Worksheets("Sheet2").Range("A2")

Regards,
Per


"BillR" skrev i meddelelsen
...
I want to do something like this:
Select a sheet
for row=3 to 17
select cells A:F
copy the cells
Select A2 on another sheet
Paste what I copied.
Shift down 1 row
next row.

I have verything down pretty well except selecting A:F for each row as it
comes up.
I would appreciate any help you can give me.
Thanks.
--
BillR