PDA

View Full Version : [SOLVED:] Paste data from a specific row



osevero
11-12-2013, 03:30 PM
Hi everyone! :hi:I need help here please. I use this code to copy/paste data from a sheet to another sheet:

Sub EF960900_2()

Dim ws1 As Worksheet
Dim ws2 As Worksheet
Dim lngRC As Long
Dim var

Set ws1 = Sheets("Plan1")
Set ws2 = Sheets("Plan2")

With ws2
lngFF = .Range("B" & Rows.Count).End(xlUp).Row + 1
End With

var = Array(6, 8, 11, 12, 13, 14, 15, 16, 17, 18, 20, 22, 24, 26, 27, 28)

For lngRC = LBound(var) To UBound(var)
ws2.Cells(lngFF, lngRC + 2).Value = ws1.Cells(var(lngRC), "C").Value
Next lngRC

ws1.Range("C6:C28").ClearContents

Set ws2 = Nothing
Set ws1 = Nothing

End Sub

The xlsx about this sheets: 10817

But I need to modify this code just to paste data from row 8. So the row 6 is the name of column, row 7 must the blank, and the row 8 is the row where it starts to paste data. If you have doubts take a look of .xlsx above and see the sheet "Plan2"

Please help, : pray2:

Cheers!

osevero
11-12-2013, 09:59 PM
Maybe I didn't explain very well.


The above code copies the data written in specific cells on worksheet 1 to worksheet 2 pasting initially in row 7, but I want to start pasting in row 8, so row 7 is blank, just like this:

10818


Are also trying to help me in this forum: http://www.mrexcel.com/forum/excel-questions/738919-starts-paste-data-specific-row-macro-visual-basic-applications.html
But so far without success: (