Need ideas on copying columns from one workbook to another

James Snyder

Well-known Member
Joined
Jan 11, 2013
Messages
618
The reason I am posting is to find an efficient (read quick) way to copy a pair of cells from one worksheet to another using matching unique values in "A". Essentially, data is coming from two different databases into two spreadsheet reports with one having two cells per record that need overwritten from correct values from the other workbook.

I thought of two nested loops as the slowest way, with one loop using a .Find as second. On a good day, both sheets will have the same number of rows and there will be no special handling, but there are data entry reasons why a value may come from one database but not the other. Due to this, my first step needs to be a check for duplicate exceptions to verify that the sets match.

If I write the exceptions off to an error handling array and delete them, I should be able to sort both and use a single loop with a direct copy of cells from one workbook to the other. I have seen some amazing code and ideas here and am wondering if anyone has a better idea?
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop

Forum statistics

Threads
1,214,978
Messages
6,122,549
Members
449,089
Latest member
davidcom

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