Merging excel files into one file

[Closed]
Report
-
Hello,

at first, sorry for my bad English, I hope everything is understandable.

I need a macro for excel that will copy rows from a few spreadsheets and create one new file with all the rows.

For Example: I have two (or more) files
File1:

Value1 Name Type Type2 Date Value2
1 AAA A B 2015 100
2 AAA B A 2015 100

File2:

Value1 Name Type Type2 Date Value2
5 AAA C A 2014 10
5 AAA B A 2012 200


I want one file with rows from both files.



If it is possible, I would want something even more complex:

For Example: I have two files:
File1:

Value1 Name Type Type2 Date Value2
1 AAA A B 2015 100
2 AAA B A 2015 100
1 BBB B B 2014 200
14 CCC B B 2014 100

File2:

Value1 Name Type Type2 Date Value2
5 AAA C A 2015 10
5 AAA B A 2015 200
10 BBB A B 2014 200
14 CCC B B 2013 100


And I want the macro to create 3 files from it, called:
"AAA"

Value1 Name Type Type2 Date Value2
1 AAA A B 2015 100
2 AAA B A 2015 100
5 AAA C A 2015 10
5 AAA B A 2015 200

"BBB"

Value1 Name Type Type2 Date Value2
1 BBB B B 2014 200
10 BBB A B 2014 200

"CCC"

Value1 Name Type Type2 Date Value2
14 CCC B B 2014 100
14 CCC B B 2013 100


Thank you in advance!

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!