View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Copy to a mid column range Row 10 - Row 20

Hi Howard,

Am Sun, 27 Jul 2014 23:17:06 -0700 (PDT) schrieb L. Howard:

Trying to convet the commented out line to copy to row 10 and offset from there on down to row 20.

Assumes there is data in the rows above 10 and below 20, so my availsble range to copy is between 10 to 20.


what range do you want to copy? Where should the data be pasted?
Do you want to copy the C12:F12 to column Q? Then try:

Sub CopyToRange_ArrOut()
Dim arrOut As Variant
Dim FERow As Long

With Sheets("Sheet1")
arrOut = .Range("C12:F12")

FERow = WorksheetFunction.Max(10, .Cells(20,
"Q").End(xlUp).Offset(1, 0).Row)
If IsEmpty(.Cells(FERow, "Q")) Then
.Cells(FERow, "Q").Resize(columnsize:=4) = arrOut
End If
End With
End Sub


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional