Hi All
I would like to open 132 files with different names from 1 to 132 and then copy data from each file and paste into a new master file
please point me in the right direction
Many thanks
Hi All
I would like to open 132 files with different names from 1 to 132 and then copy data from each file and paste into a new master file
please point me in the right direction
Many thanks
In what format are these files? .xlsx or .xls or .csv?
Are all these files stored in one folder?
Is it only one sheet that needs to be copied from each of these files?
If I have helped, Don't forget to add to my reputation (click on the star below the post)
Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
Use code tags when posting your VBA code: [code] Your code here [/code]
Here is one solution:
http://chandoo.org/wp/2012/04/09/con...cel-files-vba/
and a second solution:
http://stackoverflow.com/questions/1...her-results-fi
Alan עַם יִשְׂרָאֵל חַי
Change an Ugly Report with Power Query
Database Normalization
Complete Guide to Power Query
Man's Mind Stretched to New Dimensions Never Returns to Its Original Form
Hi
Thanks for the quick responses
Yes all of the files are in one location and i only really need to copy about three rows from each file
so on the master file i have two sheets and the rows from the first file are pasted into Sheet2 of the master file, then the next set of rows pasted in in the next row down and so on until all 132 files are been done.
i hope this helps
i have looked at the links and i dont understand the code - sorry
Also what format are the files in? If you are using excel 2007 or 2010, please update the same in your profile so its easier to help you.
Try this code considering your format is .xlsx. Change the path in the code to match your system path where the files are stored -
Copy the Excel VBA code![]()
Please Login or Register to view this content.
Select the workbook in which you want to store the Excel VBA code
Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
Choose Insert | Module
Where the cursor is flashing, choose Edit | Paste
To run the Excel VBA code:
Choose View | Macros
Select a macro in the list, and click the Run button
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks