VBA to copy all rows to the bottom of another file

SandsB

Well-known Member
Joined
Feb 13, 2007
Messages
705
Office Version
  1. 365
Platform
  1. Windows
I have a macro that ends with a file containing nothing but rows of data to be copied, as is, after the last row of data already in another file. If the number of rows of data to be copied were the same every time I might be able to fiddle with this until it works. What code could I add to my macro that says:
Copy all non-blank rows in the file I'm currently working in and paste that data after the last row of data in FileB.xlsx. Assume FileB.xlsx is already open.

Thanks guys
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Need more info please:

What's the sheet name you're entering data into?
Where are you entering this data (start column, end column, start row)?
What is the destination sheet name?
What is the start column in the destination sheet?
 
Upvote 0
What's the sheet name you're entering data into? - ResponseA
Where are you entering this data (start column, end column, start row)? - You mean the source file? Columns A through G. The number of rows will be different every time.
What is the destination sheet name? - Timing
What is the start column in the destination sheet? - The new data goes in Columns A through G but copying the entire row from the source file will work, too. Columns after G are all blank in both files.
 
Upvote 0

Forum statistics

Threads
1,214,648
Messages
6,120,726
Members
448,987
Latest member
marion_davis

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