Copy from one workbook to another but only certain columns

paulstan

Board Regular
Joined
Mar 12, 2011
Messages
85
My problem is that I need to copy data from workbook1 to workbook2 where the layouts are completely different.

I would like to select rows in workbook1 and then run a macro to copy these to workbook2; however, I would like to copy columns from workbook1, for example, C F A D H B J E and have them appear in the order A B C D E F G H on workbook2 (so Col C in book1 would go in Col A in book2, Col F in book1 would go in Col B in book2 and so on…). Number of rows is unknown.

To make it slightly easier both workbooks can be open at the same time.

The only alternative would be to change the layout in workbook1 to exactly match workbook2, but this is really the last resort.

Many thanks in advance from a complete novice.

Paul S
 
Hi,

Thank you very much, I was looking for something like this to.

But I was wondering, is it possible to build something like this, but with the 'copybutton' on the destination file?
 
Upvote 0

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.
Peter

Your help has been most invaluable.

As an aside, can non-contiguous cells be copied as well, with the code you provided?
Example: filter already done but user may wish to then manually select every third record with CTRL-click to copy. I have tried to copy this way but it copies all records, including headers.

Other than that, everything works like a dream.

Regards

Paul S
 
Last edited:
Upvote 0

Forum statistics

Threads
1,225,149
Messages
6,183,185
Members
453,151
Latest member
Lizamaison

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