merge multiples excel files data quickly

majidsiddique

Board Regular
Joined
Oct 22, 2018
Messages
164
Hi All,

can i quickly merge multiple excel files Data in single file? Heading should be same or different?

Thanks.
Majid
 
This is beyond my knowledgebase.
I will continue to monitor this thread to see what I can learn.
 
Upvote 0

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
ok, but i am trying to add more sheets DATA in this coding, not achieving.

could you please tell me how to add more sheet DATA in this coding, where i need to change this.( Sheet3 and Sheet4 DATA)
Sub Copy_One_And_Two_To_Three()
'Modified 11/7/2018 6:06:50 AM EST
Application.ScreenUpdating = False
Dim Lastrow As Long
Dim Lastrowb As Long
Dim Lastrowbc As Long
Dim Lastrowbc As Long
Lastrow = Sheets(1).Cells(Rows.Count, "A").End(xlUp).Row
Lastrowb = Sheets(2).Cells(Rows.Count, "A").End(xlUp).Row
Sheets(1).Rows(1).Resize(Lastrow).Copy Sheets(3).Rows(1)
Lastrowc = Sheets(3).Cells(Rows.Count, "A").End(xlUp).Row + 1
Sheets(2).Rows(1).Resize(Lastrowb).Copy Sheets(3).Rows(Lastrowc)
Application.ScreenUpdating = True
End Sub
 
Upvote 0
i am trying this, but only sheet1 and sheet3 data copy paste in sheet4, sheet2 data only starting 10row data copy in sheet4 out of 50rows.

Sub Copy_One_And_Two_And_Three_To_Four()
'Modified 11/7/2018 7:02:13 AM EST
Application.ScreenUpdating = False
Dim Lastrow As Long
Dim Lastrowb As Long
Dim Lastrowc As Long
Lastrow = Sheets(1).Cells(Rows.Count, "A").End(xlUp).Row
Lastrowb = Sheets(2).Cells(Rows.Count, "A").End(xlUp).Row
Lastrowb = Sheets(3).Cells(Rows.Count, "A").End(xlUp).Row
Sheets(1).Rows(1).Resize(Lastrow).Copy Sheets(4).Rows(1)
Lastrowc = Sheets(4).Cells(Rows.Count, "A").End(xlUp).Row + 1
Sheets(2).Rows(1).Resize(Lastrowb).Copy Sheets(4).Rows(Lastrowc)
Lastrowc = Sheets(4).Cells(Rows.Count, "A").End(xlUp).Row + 1
Sheets(3).Rows(1).Resize(Lastrowb).Copy Sheets(4).Rows(Lastrowc)
Lastrowc = Sheets(4).Cells(Rows.Count, "A").End(xlUp).Row + 1
Application.ScreenUpdating = True
End Sub
 
Upvote 0
You originally said copy sheet 1 and sheet 2 data to sheet 3



So now if you want more help you need to tell me what sheets you want copied and copy them into what sheet

Or are you wanting all the sheets copied into sheet 1 ?
 
Last edited:
Upvote 0
Try this:
It will copy all the sheets into sheet 1

Code:
Sub Copy_All_Sheets_To_Sheet_One()
'Modified  11/8/2018  5:38:16 AM  EST
Application.ScreenUpdating = False
Dim i As Long
Dim Lastrow As Long
Lastrow = Cells(Rows.Count, "A").End(xlUp).Row
Dim Lastrowa As Long
For i = 2 To Sheets.Count
    With Sheets(i)
        Lastrow = .Cells(Rows.Count, "A").End(xlUp).Row
        Lastrowa = Sheets(1).Cells(Rows.Count, "A").End(xlUp).Row + 1
        .Rows(1).Resize(Lastrow).Copy Sheets(1).Rows(Lastrowa)
    End With
Next
Application.ScreenUpdating = True
End Sub
 
Upvote 0
I do not know what this means:

only one thing help me to merge excel files DATA.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,325
Members
452,635
Latest member
laura12345

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