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!
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!