S
sushma
I am a newbee to Excel Macros, and I am looking for some help with
merging a particular worksheet from a buch of excel files/workbooks
into one using a macro. I found couple of examples within this group
that I could use for merging but having a small issue here while
deleting unwanted columns as explained below.
My PRoblem:
Say I have 3 excel files each with different number of columns, I need
to extract data for only few columns and add it to the master
document. The master document's template for column headers is pre-
defined, so I need to extract the same data from each of the work
books.
For example, my first file Test1.xls has the following (starting at
row 8):
Name Place quantity amount
John CA 3 40
Chu VA 4 50
My second file Test2.xls has the following (starting at row 8):
Name place occupation quantity amount
Sue MA Eng 2 20
guy CA Sales 5 60
My third file Test3.xls has the following (starting at row 8):
Name Place quantity age amount
rex NV 5 31 60
Tall NY 2 40 20
The master documnt that would combine the above three must have the
following template (for the column headers) and the rest of the
columns should be ignored:
Name quantity Amount
John 3 40
Chu 4 50
Sue 2 20
guy 5 60
rex 5 60
tall 2 20
I would greatly appreciate any help in this regard. If there are any
previous posts that already covered this, please refer me to those and
I will be happy to go over them and get back with any questions I
have.
Thank you!
Sushma
merging a particular worksheet from a buch of excel files/workbooks
into one using a macro. I found couple of examples within this group
that I could use for merging but having a small issue here while
deleting unwanted columns as explained below.
My PRoblem:
Say I have 3 excel files each with different number of columns, I need
to extract data for only few columns and add it to the master
document. The master document's template for column headers is pre-
defined, so I need to extract the same data from each of the work
books.
For example, my first file Test1.xls has the following (starting at
row 8):
Name Place quantity amount
John CA 3 40
Chu VA 4 50
My second file Test2.xls has the following (starting at row 8):
Name place occupation quantity amount
Sue MA Eng 2 20
guy CA Sales 5 60
My third file Test3.xls has the following (starting at row 8):
Name Place quantity age amount
rex NV 5 31 60
Tall NY 2 40 20
The master documnt that would combine the above three must have the
following template (for the column headers) and the rest of the
columns should be ignored:
Name quantity Amount
John 3 40
Chu 4 50
Sue 2 20
guy 5 60
rex 5 60
tall 2 20
I would greatly appreciate any help in this regard. If there are any
previous posts that already covered this, please refer me to those and
I will be happy to go over them and get back with any questions I
have.
Thank you!
Sushma