ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Merge Multiple Files (https://www.excelbanter.com/excel-programming/419991-merge-multiple-files.html)

Whois Clinton

Merge Multiple Files
 
Hi,
I am currently using Ron DeBruin's wonderful Merge Add-in to merge many
files. However, the data returns as one long extended row for each file. I
need it to return more grouped. For instance instead of


'FilepathName' Sales per hr. 25 28 30 26 24 Cards Applied 2 1 0
1 0 Hrs Worked 8 8 4 6 8

The above returns as one row I need

'FilepathName' Sales per hr 25 28 30 26 24
Cards Applied 2 1 0 1 0
hrs Worked 8 8 4 6 8

Of course there would be much more data gathered in my actual use.
I only have the Ron DeBruin Add-in not the code. I am not a VBA pro but
have copied and mopdified sufficiently so far.
Any other resources?

Thanks in advance,
Clint

Ron de Bruin

Merge Multiple Files
 
Hi Whois

No the add-in not have this option
But I want to create a code example for you if you want to try this

Give me the ranges and I reply this evening with a example


--

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


"Whois Clinton" wrote in message ...
Hi,
I am currently using Ron DeBruin's wonderful Merge Add-in to merge many
files. However, the data returns as one long extended row for each file. I
need it to return more grouped. For instance instead of


'FilepathName' Sales per hr. 25 28 30 26 24 Cards Applied 2 1 0
1 0 Hrs Worked 8 8 4 6 8

The above returns as one row I need

'FilepathName' Sales per hr 25 28 30 26 24
Cards Applied 2 1 0 1 0
hrs Worked 8 8 4 6 8

Of course there would be much more data gathered in my actual use.
I only have the Ron DeBruin Add-in not the code. I am not a VBA pro but
have copied and mopdified sufficiently so far.
Any other resources?

Thanks in advance,
Clint



Whois Clinton

Merge Multiple Files
 
WOW direct from the master himself. ok
I use your merge add-in for almost all of my queries. So here is one sample
of me trying compile ranges differently.

The Range is B4:D34 So I would want results showing the filnename, then I
reference cell B1 for the Staff Name. Column B:4 then next row Column C4:C34
and next row D4:D34. It is multiple data based on dates of the month so
that is why it would be better clumped together this way rather than the one
long row.

In seperate queries I have tried to gather info from more than one sheet i n
several files from multiple folders. Right now I run your Merge 3 times to
get info from 3 different sheets. Then LOTS of copying and pasting to
reformat. Can your Merge Add-in include ioptions for more than one sheet.
Using the "Merge All Sheets" option would be way to much and they share no
common name. They are named by months.


Thanks so much for any and all help. yur work has saved me weeks of copy
and pasting work already I greatly appreciate it.

Clint

"Ron de Bruin" wrote:

Hi Whois

No the add-in not have this option
But I want to create a code example for you if you want to try this

Give me the ranges and I reply this evening with a example


--

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


"Whois Clinton" wrote in message ...
Hi,
I am currently using Ron DeBruin's wonderful Merge Add-in to merge many
files. However, the data returns as one long extended row for each file. I
need it to return more grouped. For instance instead of


'FilepathName' Sales per hr. 25 28 30 26 24 Cards Applied 2 1 0
1 0 Hrs Worked 8 8 4 6 8

The above returns as one row I need

'FilepathName' Sales per hr 25 28 30 26 24
Cards Applied 2 1 0 1 0
hrs Worked 8 8 4 6 8

Of course there would be much more data gathered in my actual use.
I only have the Ron DeBruin Add-in not the code. I am not a VBA pro but
have copied and mopdified sufficiently so far.
Any other resources?

Thanks in advance,
Clint




Ron de Bruin

Merge Multiple Files
 
Hi Clint

I try to do it today but maybe it will be tomorrow
Send me one of the files private, easier to see for me then and test the code

Can your Merge Add-in include ioptions for more than one sheet.

You have a filter option now in the add-in for sheet names that start with contains or ends with ????

In the next version I will add a option to fill in more then one sheet name




--

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


"Whois Clinton" wrote in message ...
WOW direct from the master himself. ok
I use your merge add-in for almost all of my queries. So here is one sample
of me trying compile ranges differently.

The Range is B4:D34 So I would want results showing the filnename, then I
reference cell B1 for the Staff Name. Column B:4 then next row Column C4:C34
and next row D4:D34. It is multiple data based on dates of the month so
that is why it would be better clumped together this way rather than the one
long row.

In seperate queries I have tried to gather info from more than one sheet i n
several files from multiple folders. Right now I run your Merge 3 times to
get info from 3 different sheets. Then LOTS of copying and pasting to
reformat. Can your Merge Add-in include ioptions for more than one sheet.
Using the "Merge All Sheets" option would be way to much and they share no
common name. They are named by months.


Thanks so much for any and all help. yur work has saved me weeks of copy
and pasting work already I greatly appreciate it.

Clint

"Ron de Bruin" wrote:

Hi Whois

No the add-in not have this option
But I want to create a code example for you if you want to try this

Give me the ranges and I reply this evening with a example


--

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


"Whois Clinton" wrote in message
...
Hi,
I am currently using Ron DeBruin's wonderful Merge Add-in to merge many
files. However, the data returns as one long extended row for each file. I
need it to return more grouped. For instance instead of


'FilepathName' Sales per hr. 25 28 30 26 24 Cards Applied 2 1 0
1 0 Hrs Worked 8 8 4 6 8

The above returns as one row I need

'FilepathName' Sales per hr 25 28 30 26 24
Cards Applied 2 1 0 1 0
hrs Worked 8 8 4 6 8

Of course there would be much more data gathered in my actual use.
I only have the Ron DeBruin Add-in not the code. I am not a VBA pro but
have copied and mopdified sufficiently so far.
Any other resources?

Thanks in advance,
Clint





Whois Clinton

Merge Multiple Files
 
Ok, how do I send in private?
and thanks
Clint

"Ron de Bruin" wrote:

Hi Clint

I try to do it today but maybe it will be tomorrow
Send me one of the files private, easier to see for me then and test the code

Can your Merge Add-in include ioptions for more than one sheet.

You have a filter option now in the add-in for sheet names that start with contains or ends with ????

In the next version I will add a option to fill in more then one sheet name




--

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


"Whois Clinton" wrote in message ...
WOW direct from the master himself. ok
I use your merge add-in for almost all of my queries. So here is one sample
of me trying compile ranges differently.

The Range is B4:D34 So I would want results showing the filnename, then I
reference cell B1 for the Staff Name. Column B:4 then next row Column C4:C34
and next row D4:D34. It is multiple data based on dates of the month so
that is why it would be better clumped together this way rather than the one
long row.

In seperate queries I have tried to gather info from more than one sheet i n
several files from multiple folders. Right now I run your Merge 3 times to
get info from 3 different sheets. Then LOTS of copying and pasting to
reformat. Can your Merge Add-in include ioptions for more than one sheet.
Using the "Merge All Sheets" option would be way to much and they share no
common name. They are named by months.


Thanks so much for any and all help. yur work has saved me weeks of copy
and pasting work already I greatly appreciate it.

Clint

"Ron de Bruin" wrote:

Hi Whois

No the add-in not have this option
But I want to create a code example for you if you want to try this

Give me the ranges and I reply this evening with a example


--

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


"Whois Clinton" wrote in message
...
Hi,
I am currently using Ron DeBruin's wonderful Merge Add-in to merge many
files. However, the data returns as one long extended row for each file. I
need it to return more grouped. For instance instead of


'FilepathName' Sales per hr. 25 28 30 26 24 Cards Applied 2 1 0
1 0 Hrs Worked 8 8 4 6 8

The above returns as one row I need

'FilepathName' Sales per hr 25 28 30 26 24
Cards Applied 2 1 0 1 0
hrs Worked 8 8 4 6 8

Of course there would be much more data gathered in my actual use.
I only have the Ron DeBruin Add-in not the code. I am not a VBA pro but
have copied and mopdified sufficiently so far.
Any other resources?

Thanks in advance,
Clint





Ron de Bruin

Merge Multiple Files
 
See the mail address on this page
http://www.rondebruin.nl/

--

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


"Whois Clinton" wrote in message ...
Ok, how do I send in private?
and thanks
Clint

"Ron de Bruin" wrote:

Hi Clint

I try to do it today but maybe it will be tomorrow
Send me one of the files private, easier to see for me then and test the code

Can your Merge Add-in include ioptions for more than one sheet.

You have a filter option now in the add-in for sheet names that start with contains or ends with ????

In the next version I will add a option to fill in more then one sheet name




--

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


"Whois Clinton" wrote in message
...
WOW direct from the master himself. ok
I use your merge add-in for almost all of my queries. So here is one sample
of me trying compile ranges differently.

The Range is B4:D34 So I would want results showing the filnename, then I
reference cell B1 for the Staff Name. Column B:4 then next row Column C4:C34
and next row D4:D34. It is multiple data based on dates of the month so
that is why it would be better clumped together this way rather than the one
long row.

In seperate queries I have tried to gather info from more than one sheet i n
several files from multiple folders. Right now I run your Merge 3 times to
get info from 3 different sheets. Then LOTS of copying and pasting to
reformat. Can your Merge Add-in include ioptions for more than one sheet.
Using the "Merge All Sheets" option would be way to much and they share no
common name. They are named by months.


Thanks so much for any and all help. yur work has saved me weeks of copy
and pasting work already I greatly appreciate it.

Clint

"Ron de Bruin" wrote:

Hi Whois

No the add-in not have this option
But I want to create a code example for you if you want to try this

Give me the ranges and I reply this evening with a example


--

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


"Whois Clinton" wrote in message
...
Hi,
I am currently using Ron DeBruin's wonderful Merge Add-in to merge many
files. However, the data returns as one long extended row for each file. I
need it to return more grouped. For instance instead of


'FilepathName' Sales per hr. 25 28 30 26 24 Cards Applied 2 1 0
1 0 Hrs Worked 8 8 4 6 8

The above returns as one row I need

'FilepathName' Sales per hr 25 28 30 26 24
Cards Applied 2 1 0 1 0
hrs Worked 8 8 4 6 8

Of course there would be much more data gathered in my actual use.
I only have the Ron DeBruin Add-in not the code. I am not a VBA pro but
have copied and mopdified sufficiently so far.
Any other resources?

Thanks in advance,
Clint






Whois Clinton

Merge Multiple Files
 
I sent you an email with file. If you do not get it please let me know.
Thanks as always

"Ron de Bruin" wrote:

See the mail address on this page
http://www.rondebruin.nl/

--

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


"Whois Clinton" wrote in message ...
Ok, how do I send in private?
and thanks
Clint

"Ron de Bruin" wrote:

Hi Clint

I try to do it today but maybe it will be tomorrow
Send me one of the files private, easier to see for me then and test the code

Can your Merge Add-in include ioptions for more than one sheet.
You have a filter option now in the add-in for sheet names that start with contains or ends with ????

In the next version I will add a option to fill in more then one sheet name




--

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


"Whois Clinton" wrote in message
...
WOW direct from the master himself. ok
I use your merge add-in for almost all of my queries. So here is one sample
of me trying compile ranges differently.

The Range is B4:D34 So I would want results showing the filnename, then I
reference cell B1 for the Staff Name. Column B:4 then next row Column C4:C34
and next row D4:D34. It is multiple data based on dates of the month so
that is why it would be better clumped together this way rather than the one
long row.

In seperate queries I have tried to gather info from more than one sheet i n
several files from multiple folders. Right now I run your Merge 3 times to
get info from 3 different sheets. Then LOTS of copying and pasting to
reformat. Can your Merge Add-in include ioptions for more than one sheet.
Using the "Merge All Sheets" option would be way to much and they share no
common name. They are named by months.


Thanks so much for any and all help. yur work has saved me weeks of copy
and pasting work already I greatly appreciate it.

Clint

"Ron de Bruin" wrote:

Hi Whois

No the add-in not have this option
But I want to create a code example for you if you want to try this

Give me the ranges and I reply this evening with a example


--

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


"Whois Clinton" wrote in message
...
Hi,
I am currently using Ron DeBruin's wonderful Merge Add-in to merge many
files. However, the data returns as one long extended row for each file. I
need it to return more grouped. For instance instead of


'FilepathName' Sales per hr. 25 28 30 26 24 Cards Applied 2 1 0
1 0 Hrs Worked 8 8 4 6 8

The above returns as one row I need

'FilepathName' Sales per hr 25 28 30 26 24
Cards Applied 2 1 0 1 0
hrs Worked 8 8 4 6 8

Of course there would be much more data gathered in my actual use.
I only have the Ron DeBruin Add-in not the code. I am not a VBA pro but
have copied and mopdified sufficiently so far.
Any other resources?

Thanks in advance,
Clint







Trying To Excel

Merge Multiple Files
 
Hi Ron,

I have been able to utilize the Merge Workbooks code and it works well.
The only thing I would need to modify is to merge the data into an existing
workbook as opposed to a new workbook. I have a workbook headers I would like
to use. As a side note - is it possible to have cell or several cells with a
value to query corrosponding data from each workbook in the folder? e.g. A:1
(in target workbook) = 2008/11/15 would return only rows with this date.

Your expertise, as always is valued and appreciated.

Martin

"Ron de Bruin" wrote:

See the mail address on this page
http://www.rondebruin.nl/

--

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


"Whois Clinton" wrote in message ...
Ok, how do I send in private?
and thanks
Clint

"Ron de Bruin" wrote:

Hi Clint

I try to do it today but maybe it will be tomorrow
Send me one of the files private, easier to see for me then and test the code

Can your Merge Add-in include ioptions for more than one sheet.
You have a filter option now in the add-in for sheet names that start with contains or ends with ????

In the next version I will add a option to fill in more then one sheet name




--

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


"Whois Clinton" wrote in message
...
WOW direct from the master himself. ok
I use your merge add-in for almost all of my queries. So here is one sample
of me trying compile ranges differently.

The Range is B4:D34 So I would want results showing the filnename, then I
reference cell B1 for the Staff Name. Column B:4 then next row Column C4:C34
and next row D4:D34. It is multiple data based on dates of the month so
that is why it would be better clumped together this way rather than the one
long row.

In seperate queries I have tried to gather info from more than one sheet i n
several files from multiple folders. Right now I run your Merge 3 times to
get info from 3 different sheets. Then LOTS of copying and pasting to
reformat. Can your Merge Add-in include ioptions for more than one sheet.
Using the "Merge All Sheets" option would be way to much and they share no
common name. They are named by months.


Thanks so much for any and all help. yur work has saved me weeks of copy
and pasting work already I greatly appreciate it.

Clint

"Ron de Bruin" wrote:

Hi Whois

No the add-in not have this option
But I want to create a code example for you if you want to try this

Give me the ranges and I reply this evening with a example


--

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


"Whois Clinton" wrote in message
...
Hi,
I am currently using Ron DeBruin's wonderful Merge Add-in to merge many
files. However, the data returns as one long extended row for each file. I
need it to return more grouped. For instance instead of


'FilepathName' Sales per hr. 25 28 30 26 24 Cards Applied 2 1 0
1 0 Hrs Worked 8 8 4 6 8

The above returns as one row I need

'FilepathName' Sales per hr 25 28 30 26 24
Cards Applied 2 1 0 1 0
hrs Worked 8 8 4 6 8

Of course there would be much more data gathered in my actual use.
I only have the Ron DeBruin Add-in not the code. I am not a VBA pro but
have copied and mopdified sufficiently so far.
Any other resources?

Thanks in advance,
Clint







Ron de Bruin

Merge Multiple Files
 
The only thing I would need to modify is to merge the data into an existing
Tell me which macro you use now

You can filter the sheets in each workbook, see
http://www.rondebruin.nl/fso.htm


--

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


"Trying to Excel" wrote in message
...
Hi Ron,

I have been able to utilize the Merge Workbooks code and it works well.
The only thing I would need to modify is to merge the data into an existing
workbook as opposed to a new workbook. I have a workbook headers I would like
to use. As a side note - is it possible to have cell or several cells with a
value to query corrosponding data from each workbook in the folder? e.g. A:1
(in target workbook) = 2008/11/15 would return only rows with this date.

Your expertise, as always is valued and appreciated.

Martin

"Ron de Bruin" wrote:

See the mail address on this page
http://www.rondebruin.nl/

--

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


"Whois Clinton" wrote in message
...
Ok, how do I send in private?
and thanks
Clint

"Ron de Bruin" wrote:

Hi Clint

I try to do it today but maybe it will be tomorrow
Send me one of the files private, easier to see for me then and test the code

Can your Merge Add-in include ioptions for more than one sheet.
You have a filter option now in the add-in for sheet names that start with contains or ends with ????

In the next version I will add a option to fill in more then one sheet name




--

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


"Whois Clinton" wrote in message
...
WOW direct from the master himself. ok
I use your merge add-in for almost all of my queries. So here is one sample
of me trying compile ranges differently.

The Range is B4:D34 So I would want results showing the filnename, then I
reference cell B1 for the Staff Name. Column B:4 then next row Column C4:C34
and next row D4:D34. It is multiple data based on dates of the month so
that is why it would be better clumped together this way rather than the one
long row.

In seperate queries I have tried to gather info from more than one sheet i n
several files from multiple folders. Right now I run your Merge 3 times to
get info from 3 different sheets. Then LOTS of copying and pasting to
reformat. Can your Merge Add-in include ioptions for more than one sheet.
Using the "Merge All Sheets" option would be way to much and they share no
common name. They are named by months.


Thanks so much for any and all help. yur work has saved me weeks of copy
and pasting work already I greatly appreciate it.

Clint

"Ron de Bruin" wrote:

Hi Whois

No the add-in not have this option
But I want to create a code example for you if you want to try this

Give me the ranges and I reply this evening with a example


--

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


"Whois Clinton" wrote in message
...
Hi,
I am currently using Ron DeBruin's wonderful Merge Add-in to merge many
files. However, the data returns as one long extended row for each file. I
need it to return more grouped. For instance instead of


'FilepathName' Sales per hr. 25 28 30 26 24 Cards Applied 2 1 0
1 0 Hrs Worked 8 8 4 6 8

The above returns as one row I need

'FilepathName' Sales per hr 25 28 30 26 24
Cards Applied 2 1 0 1 0
hrs Worked 8 8 4 6 8

Of course there would be much more data gathered in my actual use.
I only have the Ron DeBruin Add-in not the code. I am not a VBA pro but
have copied and mopdified sufficiently so far.
Any other resources?

Thanks in advance,
Clint








Trying To Excel

Merge Multiple Files
 
Hi Ron,

This is part of your code I use. I place this in a module as per your
instructions. I need to place the merged data into an existing workbook which
will have the same columns and headers as the files I am getting the data
from. I can filter the data once it is in the master sheet.

Thank you,
Martin



'With the macro below you can browse to the folder instead of enter in in
the code

Sub RDB_Merge_Data_Browse()
Dim myFiles As Variant
Dim myCountOfFiles As Long
Dim oApp As Object
Dim oFolder As Variant

Set oApp = CreateObject("Shell.Application")

'Browse to the folder
Set oFolder = oApp.BrowseForFolder(0, "Select folder", 512)
If Not oFolder Is Nothing Then

myCountOfFiles = Get_File_Names( _
MyPath:=oFolder.Self.Path, _
Subfolders:=False, _
ExtStr:="*.xl*", _
myReturnedFiles:=myFiles)

If myCountOfFiles = 0 Then
MsgBox "No files that match the ExtStr in this folder"
Exit Sub
End If

Get_Data _
FileNameInA:=True, _
PasteAsValues:=True, _
SourceShName:="", _
SourceShIndex:=1, _
SourceRng:="A1:G1", _
StartCell:="", _
myReturnedFiles:=myFiles

End If

End Sub


"Ron de Bruin" wrote:

The only thing I would need to modify is to merge the data into an existing

Tell me which macro you use now

You can filter the sheets in each workbook, see
http://www.rondebruin.nl/fso.htm


--

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


"Trying to Excel" wrote in message
...
Hi Ron,

I have been able to utilize the Merge Workbooks code and it works well.
The only thing I would need to modify is to merge the data into an existing
workbook as opposed to a new workbook. I have a workbook headers I would like
to use. As a side note - is it possible to have cell or several cells with a
value to query corrosponding data from each workbook in the folder? e.g. A:1
(in target workbook) = 2008/11/15 would return only rows with this date.

Your expertise, as always is valued and appreciated.

Martin

"Ron de Bruin" wrote:

See the mail address on this page
http://www.rondebruin.nl/

--

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


"Whois Clinton" wrote in message
...
Ok, how do I send in private?
and thanks
Clint

"Ron de Bruin" wrote:

Hi Clint

I try to do it today but maybe it will be tomorrow
Send me one of the files private, easier to see for me then and test the code

Can your Merge Add-in include ioptions for more than one sheet.
You have a filter option now in the add-in for sheet names that start with contains or ends with ????

In the next version I will add a option to fill in more then one sheet name




--

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


"Whois Clinton" wrote in message
...
WOW direct from the master himself. ok
I use your merge add-in for almost all of my queries. So here is one sample
of me trying compile ranges differently.

The Range is B4:D34 So I would want results showing the filnename, then I
reference cell B1 for the Staff Name. Column B:4 then next row Column C4:C34
and next row D4:D34. It is multiple data based on dates of the month so
that is why it would be better clumped together this way rather than the one
long row.

In seperate queries I have tried to gather info from more than one sheet i n
several files from multiple folders. Right now I run your Merge 3 times to
get info from 3 different sheets. Then LOTS of copying and pasting to
reformat. Can your Merge Add-in include ioptions for more than one sheet.
Using the "Merge All Sheets" option would be way to much and they share no
common name. They are named by months.


Thanks so much for any and all help. yur work has saved me weeks of copy
and pasting work already I greatly appreciate it.

Clint

"Ron de Bruin" wrote:

Hi Whois

No the add-in not have this option
But I want to create a code example for you if you want to try this

Give me the ranges and I reply this evening with a example


--

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


"Whois Clinton" wrote in message
...
Hi,
I am currently using Ron DeBruin's wonderful Merge Add-in to merge many
files. However, the data returns as one long extended row for each file. I
need it to return more grouped. For instance instead of


'FilepathName' Sales per hr. 25 28 30 26 24 Cards Applied 2 1 0
1 0 Hrs Worked 8 8 4 6 8

The above returns as one row I need

'FilepathName' Sales per hr 25 28 30 26 24
Cards Applied 2 1 0 1 0
hrs Worked 8 8 4 6 8

Of course there would be much more data gathered in my actual use.
I only have the Ron DeBruin Add-in not the code. I am not a VBA pro but
have copied and mopdified sufficiently so far.
Any other resources?

Thanks in advance,
Clint









Ron de Bruin

Merge Multiple Files
 
In the GetData macro change

'Add a new workbook with one sheet named "Combine Sheet"
Set BaseWks = Workbooks.Add(xlWBATWorksheet).Worksheets(1)
BaseWks.Name = "Combine Sheet"

'Set start row for the Data
rnum = 1


To

'Add a new workbook with one sheet named "Combine Sheet"
Set BaseWks = Worksheets("yourworksheetname")

'Set start row for the Data, if row one have a header
rnum = 2




--

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


"Trying to Excel" wrote in message
...
Hi Ron,

This is part of your code I use. I place this in a module as per your
instructions. I need to place the merged data into an existing workbook which
will have the same columns and headers as the files I am getting the data
from. I can filter the data once it is in the master sheet.

Thank you,
Martin



'With the macro below you can browse to the folder instead of enter in in
the code

Sub RDB_Merge_Data_Browse()
Dim myFiles As Variant
Dim myCountOfFiles As Long
Dim oApp As Object
Dim oFolder As Variant

Set oApp = CreateObject("Shell.Application")

'Browse to the folder
Set oFolder = oApp.BrowseForFolder(0, "Select folder", 512)
If Not oFolder Is Nothing Then

myCountOfFiles = Get_File_Names( _
MyPath:=oFolder.Self.Path, _
Subfolders:=False, _
ExtStr:="*.xl*", _
myReturnedFiles:=myFiles)

If myCountOfFiles = 0 Then
MsgBox "No files that match the ExtStr in this folder"
Exit Sub
End If

Get_Data _
FileNameInA:=True, _
PasteAsValues:=True, _
SourceShName:="", _
SourceShIndex:=1, _
SourceRng:="A1:G1", _
StartCell:="", _
myReturnedFiles:=myFiles

End If

End Sub


"Ron de Bruin" wrote:

The only thing I would need to modify is to merge the data into an existing

Tell me which macro you use now

You can filter the sheets in each workbook, see
http://www.rondebruin.nl/fso.htm


--

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


"Trying to Excel" wrote in message
...
Hi Ron,

I have been able to utilize the Merge Workbooks code and it works well.
The only thing I would need to modify is to merge the data into an existing
workbook as opposed to a new workbook. I have a workbook headers I would like
to use. As a side note - is it possible to have cell or several cells with a
value to query corrosponding data from each workbook in the folder? e.g. A:1
(in target workbook) = 2008/11/15 would return only rows with this date.

Your expertise, as always is valued and appreciated.

Martin

"Ron de Bruin" wrote:

See the mail address on this page
http://www.rondebruin.nl/

--

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


"Whois Clinton" wrote in message
...
Ok, how do I send in private?
and thanks
Clint

"Ron de Bruin" wrote:

Hi Clint

I try to do it today but maybe it will be tomorrow
Send me one of the files private, easier to see for me then and test the code

Can your Merge Add-in include ioptions for more than one sheet.
You have a filter option now in the add-in for sheet names that start with contains or ends with ????

In the next version I will add a option to fill in more then one sheet name




--

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


"Whois Clinton" wrote in message
...
WOW direct from the master himself. ok
I use your merge add-in for almost all of my queries. So here is one sample
of me trying compile ranges differently.

The Range is B4:D34 So I would want results showing the filnename, then I
reference cell B1 for the Staff Name. Column B:4 then next row Column C4:C34
and next row D4:D34. It is multiple data based on dates of the month so
that is why it would be better clumped together this way rather than the one
long row.

In seperate queries I have tried to gather info from more than one sheet i n
several files from multiple folders. Right now I run your Merge 3 times to
get info from 3 different sheets. Then LOTS of copying and pasting to
reformat. Can your Merge Add-in include ioptions for more than one sheet.
Using the "Merge All Sheets" option would be way to much and they share no
common name. They are named by months.


Thanks so much for any and all help. yur work has saved me weeks of copy
and pasting work already I greatly appreciate it.

Clint

"Ron de Bruin" wrote:

Hi Whois

No the add-in not have this option
But I want to create a code example for you if you want to try this

Give me the ranges and I reply this evening with a example


--

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


"Whois Clinton" wrote in message
...
Hi,
I am currently using Ron DeBruin's wonderful Merge Add-in to merge many
files. However, the data returns as one long extended row for each file. I
need it to return more grouped. For instance instead of


'FilepathName' Sales per hr. 25 28 30 26 24 Cards Applied 2 1 0
1 0 Hrs Worked 8 8 4 6 8

The above returns as one row I need

'FilepathName' Sales per hr 25 28 30 26 24
Cards Applied 2 1 0 1 0
hrs Worked 8 8 4 6 8

Of course there would be much more data gathered in my actual use.
I only have the Ron DeBruin Add-in not the code. I am not a VBA pro but
have copied and mopdified sufficiently so far.
Any other resources?

Thanks in advance,
Clint










Trying To Excel

Merge Multiple Files
 
Hi Ron,

Thank you for the quick response. I will try this and let you know how I
made out.

Martin

"Ron de Bruin" wrote:

In the GetData macro change

'Add a new workbook with one sheet named "Combine Sheet"
Set BaseWks = Workbooks.Add(xlWBATWorksheet).Worksheets(1)
BaseWks.Name = "Combine Sheet"

'Set start row for the Data
rnum = 1


To

'Add a new workbook with one sheet named "Combine Sheet"
Set BaseWks = Worksheets("yourworksheetname")

'Set start row for the Data, if row one have a header
rnum = 2




--

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


"Trying to Excel" wrote in message
...
Hi Ron,

This is part of your code I use. I place this in a module as per your
instructions. I need to place the merged data into an existing workbook which
will have the same columns and headers as the files I am getting the data
from. I can filter the data once it is in the master sheet.

Thank you,
Martin



'With the macro below you can browse to the folder instead of enter in in
the code

Sub RDB_Merge_Data_Browse()
Dim myFiles As Variant
Dim myCountOfFiles As Long
Dim oApp As Object
Dim oFolder As Variant

Set oApp = CreateObject("Shell.Application")

'Browse to the folder
Set oFolder = oApp.BrowseForFolder(0, "Select folder", 512)
If Not oFolder Is Nothing Then

myCountOfFiles = Get_File_Names( _
MyPath:=oFolder.Self.Path, _
Subfolders:=False, _
ExtStr:="*.xl*", _
myReturnedFiles:=myFiles)

If myCountOfFiles = 0 Then
MsgBox "No files that match the ExtStr in this folder"
Exit Sub
End If

Get_Data _
FileNameInA:=True, _
PasteAsValues:=True, _
SourceShName:="", _
SourceShIndex:=1, _
SourceRng:="A1:G1", _
StartCell:="", _
myReturnedFiles:=myFiles

End If

End Sub


"Ron de Bruin" wrote:

The only thing I would need to modify is to merge the data into an existing
Tell me which macro you use now

You can filter the sheets in each workbook, see
http://www.rondebruin.nl/fso.htm


--

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


"Trying to Excel" wrote in message
...
Hi Ron,

I have been able to utilize the Merge Workbooks code and it works well.
The only thing I would need to modify is to merge the data into an existing
workbook as opposed to a new workbook. I have a workbook headers I would like
to use. As a side note - is it possible to have cell or several cells with a
value to query corrosponding data from each workbook in the folder? e.g. A:1
(in target workbook) = 2008/11/15 would return only rows with this date.

Your expertise, as always is valued and appreciated.

Martin

"Ron de Bruin" wrote:

See the mail address on this page
http://www.rondebruin.nl/

--

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


"Whois Clinton" wrote in message
...
Ok, how do I send in private?
and thanks
Clint

"Ron de Bruin" wrote:

Hi Clint

I try to do it today but maybe it will be tomorrow
Send me one of the files private, easier to see for me then and test the code

Can your Merge Add-in include ioptions for more than one sheet.
You have a filter option now in the add-in for sheet names that start with contains or ends with ????

In the next version I will add a option to fill in more then one sheet name




--

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


"Whois Clinton" wrote in message
...
WOW direct from the master himself. ok
I use your merge add-in for almost all of my queries. So here is one sample
of me trying compile ranges differently.

The Range is B4:D34 So I would want results showing the filnename, then I
reference cell B1 for the Staff Name. Column B:4 then next row Column C4:C34
and next row D4:D34. It is multiple data based on dates of the month so
that is why it would be better clumped together this way rather than the one
long row.

In seperate queries I have tried to gather info from more than one sheet i n
several files from multiple folders. Right now I run your Merge 3 times to
get info from 3 different sheets. Then LOTS of copying and pasting to
reformat. Can your Merge Add-in include ioptions for more than one sheet.
Using the "Merge All Sheets" option would be way to much and they share no
common name. They are named by months.


Thanks so much for any and all help. yur work has saved me weeks of copy
and pasting work already I greatly appreciate it.

Clint

"Ron de Bruin" wrote:

Hi Whois

No the add-in not have this option
But I want to create a code example for you if you want to try this

Give me the ranges and I reply this evening with a example


--

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


"Whois Clinton" wrote in message
...
Hi,
I am currently using Ron DeBruin's wonderful Merge Add-in to merge many
files. However, the data returns as one long extended row for each file. I
need it to return more grouped. For instance instead of


'FilepathName' Sales per hr. 25 28 30 26 24 Cards Applied 2 1 0
1 0 Hrs Worked 8 8 4 6 8

The above returns as one row I need

'FilepathName' Sales per hr 25 28 30 26 24
Cards Applied 2 1 0 1 0
hrs Worked 8 8 4 6 8

Of course there would be much more data gathered in my actual use.
I only have the Ron DeBruin Add-in not the code. I am not a VBA pro but
have copied and mopdified sufficiently so far.
Any other resources?

Thanks in advance,
Clint











Adnan

Merge Multiple Files
 
Dear Ron De Burin

I have also downloaded this Add-In and need the same solution please

Adnan

"Ron de Bruin" wrote:

Hi Whois

No the add-in not have this option
But I want to create a code example for you if you want to try this

Give me the ranges and I reply this evening with a example


--

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


"Whois Clinton" wrote in message ...
Hi,
I am currently using Ron DeBruin's wonderful Merge Add-in to merge many
files. However, the data returns as one long extended row for each file. I
need it to return more grouped. For instance instead of


'FilepathName' Sales per hr. 25 28 30 26 24 Cards Applied 2 1 0
1 0 Hrs Worked 8 8 4 6 8

The above returns as one row I need

'FilepathName' Sales per hr 25 28 30 26 24
Cards Applied 2 1 0 1 0
hrs Worked 8 8 4 6 8

Of course there would be much more data gathered in my actual use.
I only have the Ron DeBruin Add-in not the code. I am not a VBA pro but
have copied and mopdified sufficiently so far.
Any other resources?

Thanks in advance,
Clint





All times are GMT +1. The time now is 09:57 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com