View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Per Jessen[_2_] Per Jessen[_2_] is offline
external usenet poster
 
Posts: 703
Default Copy Row 2 from Sheet1 & Paste to Row 10 Sheet2

Hi
Ryan

I'm a bit confused, do you want to paste to row 10 or 20 ? I assume
that it's row 10.

Try this

Sub move()
If Range("A10").Value = "" Then
TargetRow = 10
Else
TargetRow = Range("A" & Rows.Count).End(xlUp).Row + 1
End If
Worksheets("Sheet1").Rows(2).Copy Destination:=Worksheets
("Sheet2").Cells(TargetRow, "A")
End Sub


Regards,
Per


On 23 Nov., 06:14, RyGuy wrote:
How can I copy Row 2 from Sheet1 & paste to Row 10 Sheet2, if Sheet2 Row20 is
blank, and if it is not blank, paste to the next blank row in Sheet2?

I have an idea of how to copy form 1 and paste to 2, in the first blank row
in 2:
Worksheets("Sheet1").Range("2:2").EntireRow.Copy
Worksheets("Sheet2").Range("A65536").End(xlUp)(2). EntireRow

However, I can't figure out how to test if Sheet2, Row10 is blank, and if it
is blank, paste there, but if it is not blank, paste in the first blank row
on Sheet 2. *

Regards,
Ryan---