Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Merging XLS Files

Heres my goal. I have a directory full of .xls files, around 500 or
so. I would like to
merge all these files (all located in c:\data) into one master file.
Doing
this through a macro would be prefered because importing each file
individually would take about 2 months to complete :)

All XLS files are the same. The formating in all 500 xls files are
identical. The only thing that varies is the data held with-in. The
columns and what not are the same. They just hold information for
specific dates. And I want to make one master that combines all the
information from the past 2 years into one XLS file.

Any help with this? Im new to macro's and dont really know where to
start :(

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Merging XLS Files

Hi wmureports

Start here
http://www.rondebruin.nl/copy3.htm

Post back if you need more help


--
Regards Ron De Bruin
http://www.rondebruin.nl



"wmureports" wrote in message oups.com...
Heres my goal. I have a directory full of .xls files, around 500 or
so. I would like to
merge all these files (all located in c:\data) into one master file.
Doing
this through a macro would be prefered because importing each file
individually would take about 2 months to complete :)

All XLS files are the same. The formating in all 500 xls files are
identical. The only thing that varies is the data held with-in. The
columns and what not are the same. They just hold information for
specific dates. And I want to make one master that combines all the
information from the past 2 years into one XLS file.

Any help with this? Im new to macro's and dont really know where to
start :(



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Merging XLS Files

Thanks Ron, Ill check it out and let you know how it goes.


Ron de Bruin wrote:
Hi wmureports

Start here
http://www.rondebruin.nl/copy3.htm

Post back if you need more help


--
Regards Ron De Bruin
http://www.rondebruin.nl



"wmureports" wrote in message oups.com...
Heres my goal. I have a directory full of .xls files, around 500 or
so. I would like to
merge all these files (all located in c:\data) into one master file.
Doing
this through a macro would be prefered because importing each file
individually would take about 2 months to complete :)

All XLS files are the same. The formating in all 500 xls files are
identical. The only thing that varies is the data held with-in. The
columns and what not are the same. They just hold information for
specific dates. And I want to make one master that combines all the
information from the past 2 years into one XLS file.

Any help with this? Im new to macro's and dont really know where to
start :(


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Merging XLS Files

Ok question for you... Ive been reading through your tutorial and been
playing around implementing it into my master record. Few questions.
The header on each page goes from Cell A1:F1, A2:F2, & A3:F3. So the
actual data doesnt start till A4:F4. So how do i set it to only start
copying the information from A4:F4 and beyond all the way down to the
bottom of the page wether it be A100:F100 or A500:F500.

Then it needs to start inserting the data into field A4 on the master.

Your help is appreciated.

wmureports wrote:
Thanks Ron, Ill check it out and let you know how it goes.


Ron de Bruin wrote:
Hi wmureports

Start here
http://www.rondebruin.nl/copy3.htm

Post back if you need more help


--
Regards Ron De Bruin
http://www.rondebruin.nl



"wmureports" wrote in message oups.com...
Heres my goal. I have a directory full of .xls files, around 500 or
so. I would like to
merge all these files (all located in c:\data) into one master file.
Doing
this through a macro would be prefered because importing each file
individually would take about 2 months to complete :)

All XLS files are the same. The formating in all 500 xls files are
identical. The only thing that varies is the data held with-in. The
columns and what not are the same. They just hold information for
specific dates. And I want to make one master that combines all the
information from the past 2 years into one XLS file.

Any help with this? Im new to macro's and dont really know where to
start :(


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Merging XLS Files

Hi wmureports

See
http://www.rondebruin.nl/copy3.htm#header

Change

rnum = 1
to
rnum = 4

And

Set sourceRange = mybook.Worksheets(1).Range("A2:IV" & lrow)
to
Set sourceRange = mybook.Worksheets(1).Range("A4:IV" & lrow)




--
Regards Ron De Bruin
http://www.rondebruin.nl



"wmureports" wrote in message oups.com...
Ok question for you... Ive been reading through your tutorial and been
playing around implementing it into my master record. Few questions.
The header on each page goes from Cell A1:F1, A2:F2, & A3:F3. So the
actual data doesnt start till A4:F4. So how do i set it to only start
copying the information from A4:F4 and beyond all the way down to the
bottom of the page wether it be A100:F100 or A500:F500.

Then it needs to start inserting the data into field A4 on the master.

Your help is appreciated.

wmureports wrote:
Thanks Ron, Ill check it out and let you know how it goes.


Ron de Bruin wrote:
Hi wmureports

Start here
http://www.rondebruin.nl/copy3.htm

Post back if you need more help


--
Regards Ron De Bruin
http://www.rondebruin.nl



"wmureports" wrote in message oups.com...
Heres my goal. I have a directory full of .xls files, around 500 or
so. I would like to
merge all these files (all located in c:\data) into one master file.
Doing
this through a macro would be prefered because importing each file
individually would take about 2 months to complete :)

All XLS files are the same. The formating in all 500 xls files are
identical. The only thing that varies is the data held with-in. The
columns and what not are the same. They just hold information for
specific dates. And I want to make one master that combines all the
information from the past 2 years into one XLS file.

Any help with this? Im new to macro's and dont really know where to
start :(






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Merging XLS Files

Ok one more question... It seems to be copying certain fields that
have no data.. What if statement would i use to not add blank records?

If basebook.Worksheets(1).Cells.Value < "" or something along those
lines??

Thanks,


Ron de Bruin wrote:
Hi wmureports

See
http://www.rondebruin.nl/copy3.htm#header

Change

rnum = 1
to
rnum = 4

And

Set sourceRange = mybook.Worksheets(1).Range("A2:IV" & lrow)
to
Set sourceRange = mybook.Worksheets(1).Range("A4:IV" & lrow)




--
Regards Ron De Bruin
http://www.rondebruin.nl



"wmureports" wrote in message oups.com...
Ok question for you... Ive been reading through your tutorial and been
playing around implementing it into my master record. Few questions.
The header on each page goes from Cell A1:F1, A2:F2, & A3:F3. So the
actual data doesnt start till A4:F4. So how do i set it to only start
copying the information from A4:F4 and beyond all the way down to the
bottom of the page wether it be A100:F100 or A500:F500.

Then it needs to start inserting the data into field A4 on the master.

Your help is appreciated.

wmureports wrote:
Thanks Ron, Ill check it out and let you know how it goes.


Ron de Bruin wrote:
Hi wmureports

Start here
http://www.rondebruin.nl/copy3.htm

Post back if you need more help


--
Regards Ron De Bruin
http://www.rondebruin.nl



"wmureports" wrote in message oups.com...
Heres my goal. I have a directory full of .xls files, around 500 or
so. I would like to
merge all these files (all located in c:\data) into one master file.
Doing
this through a macro would be prefered because importing each file
individually would take about 2 months to complete :)

All XLS files are the same. The formating in all 500 xls files are
identical. The only thing that varies is the data held with-in. The
columns and what not are the same. They just hold information for
specific dates. And I want to make one master that combines all the
information from the past 2 years into one XLS file.

Any help with this? Im new to macro's and dont really know where to
start :(



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Merging XLS Files

Actually it should only ignore it if the whole row of data is blank.
Some rows have data mixed in with blank fields which is fine, but Id
like the macro to completely ignore complete rows that contain no data.
Thanks


wmureports wrote:
Ok one more question... It seems to be copying certain fields that
have no data.. What if statement would i use to not add blank records?

If basebook.Worksheets(1).Cells.Value < "" or something along those
lines??

Thanks,


Ron de Bruin wrote:
Hi wmureports

See
http://www.rondebruin.nl/copy3.htm#header

Change

rnum = 1
to
rnum = 4

And

Set sourceRange = mybook.Worksheets(1).Range("A2:IV" & lrow)
to
Set sourceRange = mybook.Worksheets(1).Range("A4:IV" & lrow)




--
Regards Ron De Bruin
http://www.rondebruin.nl



"wmureports" wrote in message oups.com...
Ok question for you... Ive been reading through your tutorial and been
playing around implementing it into my master record. Few questions.
The header on each page goes from Cell A1:F1, A2:F2, & A3:F3. So the
actual data doesnt start till A4:F4. So how do i set it to only start
copying the information from A4:F4 and beyond all the way down to the
bottom of the page wether it be A100:F100 or A500:F500.

Then it needs to start inserting the data into field A4 on the master.

Your help is appreciated.

wmureports wrote:
Thanks Ron, Ill check it out and let you know how it goes.


Ron de Bruin wrote:
Hi wmureports

Start here
http://www.rondebruin.nl/copy3.htm

Post back if you need more help


--
Regards Ron De Bruin
http://www.rondebruin.nl



"wmureports" wrote in message oups.com...
Heres my goal. I have a directory full of .xls files, around 500 or
so. I would like to
merge all these files (all located in c:\data) into one master file.
Doing
this through a macro would be prefered because importing each file
individually would take about 2 months to complete :)

All XLS files are the same. The formating in all 500 xls files are
identical. The only thing that varies is the data held with-in. The
columns and what not are the same. They just hold information for
specific dates. And I want to make one master that combines all the
information from the past 2 years into one XLS file.

Any help with this? Im new to macro's and dont really know where to
start :(



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Merging XLS Files

Hi wmureports

If you want to check the whole row then you must loop through the whole list or
add one column with a formula in the sheet with the merged data and AutoFilter on this column

Use the countA worksheetfunction for this in a column to the right of your last column with data
use a If function that display "Delete" if the count = 0
you can Autofilter on that column then and delete the visible rows



--
Regards Ron De Bruin
http://www.rondebruin.nl



"wmureports" wrote in message ps.com...
Actually it should only ignore it if the whole row of data is blank.
Some rows have data mixed in with blank fields which is fine, but Id
like the macro to completely ignore complete rows that contain no data.
Thanks


wmureports wrote:
Ok one more question... It seems to be copying certain fields that
have no data.. What if statement would i use to not add blank records?

If basebook.Worksheets(1).Cells.Value < "" or something along those
lines??

Thanks,


Ron de Bruin wrote:
Hi wmureports

See
http://www.rondebruin.nl/copy3.htm#header

Change

rnum = 1
to
rnum = 4

And

Set sourceRange = mybook.Worksheets(1).Range("A2:IV" & lrow)
to
Set sourceRange = mybook.Worksheets(1).Range("A4:IV" & lrow)




--
Regards Ron De Bruin
http://www.rondebruin.nl



"wmureports" wrote in message oups.com...
Ok question for you... Ive been reading through your tutorial and been
playing around implementing it into my master record. Few questions.
The header on each page goes from Cell A1:F1, A2:F2, & A3:F3. So the
actual data doesnt start till A4:F4. So how do i set it to only start
copying the information from A4:F4 and beyond all the way down to the
bottom of the page wether it be A100:F100 or A500:F500.

Then it needs to start inserting the data into field A4 on the master.

Your help is appreciated.

wmureports wrote:
Thanks Ron, Ill check it out and let you know how it goes.


Ron de Bruin wrote:
Hi wmureports

Start here
http://www.rondebruin.nl/copy3.htm

Post back if you need more help


--
Regards Ron De Bruin
http://www.rondebruin.nl



"wmureports" wrote in message oups.com...
Heres my goal. I have a directory full of .xls files, around 500 or
so. I would like to
merge all these files (all located in c:\data) into one master file.
Doing
this through a macro would be prefered because importing each file
individually would take about 2 months to complete :)

All XLS files are the same. The formating in all 500 xls files are
identical. The only thing that varies is the data held with-in. The
columns and what not are the same. They just hold information for
specific dates. And I want to make one master that combines all the
information from the past 2 years into one XLS file.

Any help with this? Im new to macro's and dont really know where to
start :(





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 files Maaz New Users to Excel 3 March 1st 07 04:24 PM
merging zip files! via135 Excel Discussion (Misc queries) 2 November 19th 06 05:32 PM
Merging files Ian Excel Programming 6 November 26th 05 05:29 PM
merging two files morry[_20_] Excel Programming 7 June 22nd 04 08:15 PM
Merging Files rglasunow[_13_] Excel Programming 3 February 3rd 04 01:27 AM


All times are GMT +1. The time now is 10:21 PM.

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"