Davers
Well-known Member
- Joined
- Sep 17, 2002
- Messages
- 1,165
Hi everyone, this does everything I want, except starting the paste in the next available row on sheet2. The code is looking at a value in cell H1, if the cell in column A matches, it copies the row and pastes to Sheet2..but it pastes the same row as the originating data. So if the first cell that matches criteria in column A is cell A10, it copies that whole row, and pastes it into cell A10 on sheet2...I need it to paste into the next available cell on Sheet2...any ideas?
Here is my code so far:
Thanks for the help...
Dave
Here is my code so far:
Code:
Sub lrnLoop()
x = Range("A65536").End(xlUp).Row
For Each i In Range("A1:A" & x)
If i.Value = Range("H1").Value Then
i.EntireRow.Copy Worksheets("Sheet2").Range("A" & i.Row)
End If
Next i
End Sub
Thanks for the help...
Dave