Pasting data from one sheet to last blank row of another sheet (Macro)

NewTOvba26

New Member
Joined
Feb 17, 2017
Messages
15
I have 3 data files "Data1", "Data2", and "Data3". All 3 files are stored on desktop. I need help in pasting this data on Sheet1 of "Final Data" file one below another. Data in all 3 data files are not fixed and last row may very every time. This needs to be done very frequently and hence a macro coding for doing this will help a lot. I did a lot of research on google but was unable to find a working solution. I would be grateful is someone can help me get this done. Any help will be greatly appreciated.
 
Last edited:

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Try this. It assumes all four workbooks are open at runtime.

Code:
Sub t()
Dim sh1 As Worksheet, sh2 As Worksheet, sh3 As Worksheet, sh4 As Worksheet
Set sh1 = Workbooks("Data1.xlsx").Sheets(1)
Set sh2 = Workbooks("Data2.xlsx").Sheets(1)
Set sh3 = Workbooks("Data3.xlsx").Sheets(1)
Set sh4 = Workbooks("Final Data.xlsx").Sheets(1)
sh1.UsedRange.Offset(1).Copy sh4.Cells(Rows.Count, 1).End(xlUp)(2)
sh2.UsedRange.Offset(1).Copy sh4.Cells(Rows.Count, 1).End(xlUp)(2)
sh3.UsedRange.Offset(1).Copy sh4.Cells(Rows.Count, 1).End(xlUp)(2)
End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,375
Messages
6,124,578
Members
449,174
Latest member
chandan4057

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