Copy Rows from individual Sheets and paste the same in a new sheet in excel using VBA

cowshal

New Member
Joined
Aug 25, 2009
Messages
3
Hi Experts,

I am a novice in using VBA or Macros in excel. I need a help in copying all the available rows from Individual Sheet say A, B & C that needs to be copied to Sheet D in the given below fashion in a Worksheet:

Copy Row1 from Sheet A
Copy Row1 from Sheet B
Copy Row1 from Sheet C

Output Results in Sheet D should be:
Row1 = Paste Row1 from Sheet A
Row2 = Paste Row1 from Sheet B
Row3 = Paste Row1 from Sheet C
Row4 = Paste Row2 from Sheet A
Row5 = Paste Row2 from Sheet B
Row6 = Paste Row2 from Sheet C

I have around 4224 rows in Sheets A, B & C that needs to be copied to Sheet D. Hope i have explained what i am looking at above clearly. If you need any clarifications then, please let me know.

Your help would be greatly appreciated...

Thanking a lot in advance...


Thanks & Regards,
Kaushal
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Hello and welcome to MrExcel.

Do the sheets A, B and C each have the same number of rows?

Are the sheet names actually A, B, C and D?
 
Upvote 0
Try this - it will take a while to run

Code:
Sub ABCtoD()
Dim LR As Long, i As Long, j As Long
Application.ScreenUpdating = False
LR = Sheets("A").Range("A" & Rows.Count).End(xlUp).Row
For i = 1 To LR
    j = j + 1
    Sheets("A").Rows(i).Copy Destination:=Sheets("D").Range("A" & j)
    j = j + 1
    Sheets("B").Rows(i).Copy Destination:=Sheets("D").Range("A" & j)
    j = j + 1
    Sheets("C").Rows(i).Copy Destination:=Sheets("D").Range("A" & j)
Next i
Application.ScreenUpdating = True
End Sub
 
Upvote 0
Hi Peter,

You are just amazing....mind blowing...

It just worked the way i needed....

I was searching on net for the VBA code since a week and i could not get any solution for the above scenario but, you did it just in minutes...

Thanks a lot... & Have a nice day...
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top