Comparing data from worksheets in a folder

excellearner241

New Member
Joined
Jan 17, 2020
Messages
1
Office Version
  1. 2010
Platform
  1. Windows
So I am trying to compare and match data from 2 workbooks in a folder at once. There is about 700 workbook files in the folder. For example: compare the cells in workbook 2 to workbook 1 and the cells in workbook 2 that are not in workbook 1, paste the cells and show the number of cells. The process should repeat for Workbooks 3 and 2, then workbooks 4 and 3, then 5 and 4, and so on, until the last workbook.
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
that's a pretty long operation, sir. I do know, unless i'm mistaken, that you can write formulas in cells in 1 workbook that pull data from cells in workbook 2 if both workbooks are open. you can also obviously copy and paste in that regard when both are open. but for what you want, I don't see that you have any other choice than to write code to loop every book in the folder, open them one by one, along with opening your "source"/"referencing"/"template" book and keeping it open, and then using the code to do the work. I gave another person a sample of how to open multiple books (csv files) like this that are in a single location in this thread: How to transpose multi CSV files in a folder using VBA into 1 excel file. also, allen browne's site has so much vba info on it you can literally spend years exploring it. here's one of his pages that is relevant to your needs: Microsoft Access tips: List files recursively. in that code, you would have to modify the primary routine to open workbooks rather than just list file names, but that's easy to change.

see what you can gather from those resources.
 
Upvote 0

Forum statistics

Threads
1,215,013
Messages
6,122,694
Members
449,092
Latest member
snoom82

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