Copy Rows from SheetA,B&C and paste in SheetD
Closed
Cowshal
Posts
2
Registration date
Thursday August 20, 2009
Status
Member
Last seen
August 24, 2009
-
Aug 21, 2009 at 03:08 AM
Cowshal Posts 2 Registration date Thursday August 20, 2009 Status Member Last seen August 24, 2009 - Aug 24, 2009 at 05:52 AM
Cowshal Posts 2 Registration date Thursday August 20, 2009 Status Member Last seen August 24, 2009 - Aug 24, 2009 at 05:52 AM
Related:
- Copy Rows from SheetA,B&C and paste in SheetD
- How to paste photo in resume - Guide
- Whatsapp web copy paste text not working ✓ - WhatsApp Forum
- Compare two worksheets and paste differences to another sheet - excel vba free download - Excel Forum
- Pi copy and paste - Guide
- Macro to compare 2 sheets and copy differences ✓ - Excel Forum
1 response
Cowshal
Posts
2
Registration date
Thursday August 20, 2009
Status
Member
Last seen
August 24, 2009
Aug 24, 2009 at 05:52 AM
Aug 24, 2009 at 05:52 AM
This is the piece of code that i have found that has worked nearest to the result i was expecting.
Private Sub CommandButton1_Click()
Dim x() As Variant
Dim y() As Variant
For i = 2 To 12672 Step 3
Worksheets("C").Rows(i + 1).EntireRow.Insert Shift:=xlDown
Worksheets("C").Rows(i + 1).EntireRow.Insert Shift:=xlDown
Next i
k = 3
For j = 2 To 4224
Sheets("C").Cells(k, 6).Value = Sheets("A").Cells(j, 4)
Sheets("C").Cells(k + 1, 6).Value = Sheets("B").Cells(j, 4)
k = k + 3
Next j
End Sub
Private Sub CommandButton1_Click()
Dim x() As Variant
Dim y() As Variant
For i = 2 To 12672 Step 3
Worksheets("C").Rows(i + 1).EntireRow.Insert Shift:=xlDown
Worksheets("C").Rows(i + 1).EntireRow.Insert Shift:=xlDown
Next i
k = 3
For j = 2 To 4224
Sheets("C").Cells(k, 6).Value = Sheets("A").Cells(j, 4)
Sheets("C").Cells(k + 1, 6).Value = Sheets("B").Cells(j, 4)
k = k + 3
Next j
End Sub