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
- Copy and paste fonts - Guide
- How to paste photo in resume - Guide
- Root directory is full or error in pasting - Android Forum
- How to delete a row in a table in word - Guide
- Insert a new sheet at the end of the tab names and paste the range names starting in cell a1. autofit columns a:b and name the worksheet as range names. ✓ - 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