Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Merging 800 Excel files

I have 800 (!) Excel files - all organized the same way.

They may contain 2 to - let say - 100 rows. Only columns A through C are used.

My goal is to gather all this info into one file. However, i would like the name of the original file to be placed in Column D (for every row), ie:


File1.xls:
Fruit;Weight;Qty
Apple;5;20
Banana;1;4
Peach;3;9

File2.xls:
Fruit;Weight;Qty
Pear;4;17
Plum;2;30

MergedFile.xls:
Fruit;Weight;Qty;File1.xls
Apple;5;20;File1.xls
Banana;1;4;File1.xls
Peach;3;9;File1.xls
Fruit;Weight;Qty;File2.xls
Pear;4;17;File2.xls
Plum;2;30;File2.xls

I assume a macro could handle this, but i lack the necessary knowledge, so any suggestions would be heighly appreciated. Any conditions like "all excel files should be opened on the working computer before macro is run" are no problem.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default Merging 800 Excel files

Check out this page for code and a add-in
http://www.rondebruin.nl/copy3.htm



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Kjetil" wrote in message ...
I have 800 (!) Excel files - all organized the same way.

They may contain 2 to - let say - 100 rows. Only columns A through C are used.

My goal is to gather all this info into one file. However, i would like the name of the original file to be placed in Column D (for every row), ie:


File1.xls:
Fruit;Weight;Qty
Apple;5;20
Banana;1;4
Peach;3;9

File2.xls:
Fruit;Weight;Qty
Pear;4;17
Plum;2;30

MergedFile.xls:
Fruit;Weight;Qty;File1.xls
Apple;5;20;File1.xls
Banana;1;4;File1.xls
Peach;3;9;File1.xls
Fruit;Weight;Qty;File2.xls
Pear;4;17;File2.xls
Plum;2;30;File2.xls

I assume a macro could handle this, but i lack the necessary knowledge, so any suggestions would be heighly appreciated. Any conditions like "all excel files should be opened on the working computer before macro is run" are no problem.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Merging to identical Excel files Word problems Excel Discussion (Misc queries) 4 January 12th 06 09:40 PM
Merging Different excel files into one Neill Excel Discussion (Misc queries) 0 October 27th 05 10:15 PM
Merging text files with excel SpaceMax New Users to Excel 1 July 13th 05 02:36 AM
merging my excel files Donna YaWanna Excel Discussion (Misc queries) 1 June 14th 05 01:53 AM
Merging two different files justinfisher Excel Discussion (Misc queries) 0 January 21st 05 09:53 PM


All times are GMT +1. The time now is 05:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"