Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
dagriffin
 
Posts: n/a
Default Merge worksheets from separate files into one workbook.

I have several single-worksheet Excel files/workbooks that I would like to
merge into a single file/workbook. Any idea how I can turn these into one?
Thx!
  #2   Report Post  
Posted to microsoft.public.excel.misc
Lilsis7
 
Posts: n/a
Default Merge worksheets from separate files into one workbook.



"dagriffin" wrote:

I have several single-worksheet Excel files/workbooks that I would like to
merge into a single file/workbook. Any idea how I can turn these into one?
Thx!


To do this, save one of the documents as your entire book, then, right
click on the bottom tab of the other documents you want to move, and hit move
or copy. on this selection at the top is an arrow, says move to book, arrow
down until you see the name of your new file. Make sure you click the box at
the bottom of the window that says make a copy so you won't loose your
original (unless you don't need it anymore) Do this with every file.
  #3   Report Post  
Posted to microsoft.public.excel.misc
dagriffin
 
Posts: n/a
Default Merge worksheets from separate files into one workbook.

See other reply below...

"Lilsis7" wrote:



"dagriffin" wrote:

I have several single-worksheet Excel files/workbooks that I would like to
merge into a single file/workbook. Any idea how I can turn these into one?
Thx!


To do this, save one of the documents as your entire book, then, right
click on the bottom tab of the other documents you want to move, and hit move
or copy. on this selection at the top is an arrow, says move to book, arrow
down until you see the name of your new file. Make sure you click the box at
the bottom of the window that says make a copy so you won't loose your
original (unless you don't need it anymore) Do this with every file.

  #4   Report Post  
Posted to microsoft.public.excel.misc
bpeltzer
 
Posts: n/a
Default Merge worksheets from separate files into one workbook.

Open the first single-sheet workbook and File / Save As, and give it the new
file name. Keep that file open.
In turn, open each remaining single-sheet workbook and right-click on its
worksheet tab, select Move or Copy and use the drop-down to choose the name
of the workbook you created in the first step above. Don't select the 'copy'
checkbox, and click OK.
When you've done this w/each single-sheet workbook, you'll have them all
compiled in one.
IF each original file uses the same worksheet name, you'll probably want to
rename the worksheets before moving them so you can tell which sheet is which
(right-click on the tab and select Rename, then type in the new name).

"dagriffin" wrote:

I have several single-worksheet Excel files/workbooks that I would like to
merge into a single file/workbook. Any idea how I can turn these into one?
Thx!

  #5   Report Post  
Posted to microsoft.public.excel.misc
dagriffin
 
Posts: n/a
Default Merge worksheets from separate files into one workbook.

Guess I should have been clearer. I have 71 of these files to compress into
one. I can do it manually as suggested, but was looking for something more
automated as this will be a repetitive weekly task going forward. Any
functions within Excel or macro tips that would allow this to be done with
the "press of a button" for all 71 files?

"bpeltzer" wrote:

Open the first single-sheet workbook and File / Save As, and give it the new
file name. Keep that file open.
In turn, open each remaining single-sheet workbook and right-click on its
worksheet tab, select Move or Copy and use the drop-down to choose the name
of the workbook you created in the first step above. Don't select the 'copy'
checkbox, and click OK.
When you've done this w/each single-sheet workbook, you'll have them all
compiled in one.
IF each original file uses the same worksheet name, you'll probably want to
rename the worksheets before moving them so you can tell which sheet is which
(right-click on the tab and select Rename, then type in the new name).

"dagriffin" wrote:

I have several single-worksheet Excel files/workbooks that I would like to
merge into a single file/workbook. Any idea how I can turn these into one?
Thx!



  #6   Report Post  
Posted to microsoft.public.excel.misc
Mark HOlcomb
 
Posts: n/a
Default Merge worksheets from separate files into one workbook.

I have done somthing similiar .. mining data from several seperated exel
files and merging them into one. I found the kernal of this in the help
files. I cut and paste this from my working vba ..hope it give you some idea
of one path to take.

Sub test()
Application.Calculation = xlManual 'stop auto calculation
ifile = 129 'first file
number-1
For i = 1 To 5 'loop on
files=130 to 134
namefile = "Flow" + CStr(ifile+ i) + ".xls"
Name = "C:\" + namefile 'set file name"
Set MyXL = GetObject(Name) 'Set the object
variable to reference the file you want to see.
MyXL.Application.Visible = True
MyXL.Parent.Windows(1).Visible = True 'note window(1) is
the parent worksheet , window(2) is worksheet being read on

For j = 21 To 50 'grab data from (row 2
,col 21 thru 48)
a = Workbooks(namefile).Worksheets("Data").Cells(2, j) 'grab info
from worksheet and add it to parent worksheet
ThisWorkbook.Worksheets(1).Cells(i, j - 20) = a 'put data in
(row i,col 1 to 28)
Next j
'close the sheet
MyXL.Save 'save loop worksheet (using saveas and other it
can be closed without saving)
MyXL.Close 'close loop worksheet
Set MyXL = Nothing ' Release reference to the
Next i
Application.Calculation = xlAutomatic 'turn on recalculation
End Sub




"dagriffin" wrote:

Guess I should have been clearer. I have 71 of these files to compress into
one. I can do it manually as suggested, but was looking for something more
automated as this will be a repetitive weekly task going forward. Any
functions within Excel or macro tips that would allow this to be done with
the "press of a button" for all 71 files?

"bpeltzer" wrote:

Open the first single-sheet workbook and File / Save As, and give it the new
file name. Keep that file open.
In turn, open each remaining single-sheet workbook and right-click on its
worksheet tab, select Move or Copy and use the drop-down to choose the name
of the workbook you created in the first step above. Don't select the 'copy'
checkbox, and click OK.
When you've done this w/each single-sheet workbook, you'll have them all
compiled in one.
IF each original file uses the same worksheet name, you'll probably want to
rename the worksheets before moving them so you can tell which sheet is which
(right-click on the tab and select Rename, then type in the new name).

"dagriffin" wrote:

I have several single-worksheet Excel files/workbooks that I would like to
merge into a single file/workbook. Any idea how I can turn these into one?
Thx!

  #7   Report Post  
Posted to microsoft.public.excel.misc
dagriffin
 
Posts: n/a
Default Merge worksheets from separate files into one workbook.

Looks promising! Thanks for the suggestion, I will be starting from here!!

"Mark HOlcomb" wrote:

I have done somthing similiar .. mining data from several seperated exel
files and merging them into one. I found the kernal of this in the help
files. I cut and paste this from my working vba ..hope it give you some idea
of one path to take.

Sub test()
Application.Calculation = xlManual 'stop auto calculation
ifile = 129 'first file
number-1
For i = 1 To 5 'loop on
files=130 to 134
namefile = "Flow" + CStr(ifile+ i) + ".xls"
Name = "C:\" + namefile 'set file name"
Set MyXL = GetObject(Name) 'Set the object
variable to reference the file you want to see.
MyXL.Application.Visible = True
MyXL.Parent.Windows(1).Visible = True 'note window(1) is
the parent worksheet , window(2) is worksheet being read on

For j = 21 To 50 'grab data from (row 2
,col 21 thru 48)
a = Workbooks(namefile).Worksheets("Data").Cells(2, j) 'grab info
from worksheet and add it to parent worksheet
ThisWorkbook.Worksheets(1).Cells(i, j - 20) = a 'put data in
(row i,col 1 to 28)
Next j
'close the sheet
MyXL.Save 'save loop worksheet (using saveas and other it
can be closed without saving)
MyXL.Close 'close loop worksheet
Set MyXL = Nothing ' Release reference to the
Next i
Application.Calculation = xlAutomatic 'turn on recalculation
End Sub




"dagriffin" wrote:

Guess I should have been clearer. I have 71 of these files to compress into
one. I can do it manually as suggested, but was looking for something more
automated as this will be a repetitive weekly task going forward. Any
functions within Excel or macro tips that would allow this to be done with
the "press of a button" for all 71 files?

"bpeltzer" wrote:

Open the first single-sheet workbook and File / Save As, and give it the new
file name. Keep that file open.
In turn, open each remaining single-sheet workbook and right-click on its
worksheet tab, select Move or Copy and use the drop-down to choose the name
of the workbook you created in the first step above. Don't select the 'copy'
checkbox, and click OK.
When you've done this w/each single-sheet workbook, you'll have them all
compiled in one.
IF each original file uses the same worksheet name, you'll probably want to
rename the worksheets before moving them so you can tell which sheet is which
(right-click on the tab and select Rename, then type in the new name).

"dagriffin" wrote:

I have several single-worksheet Excel files/workbooks that I would like to
merge into a single file/workbook. Any idea how I can turn these into one?
Thx!

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
Protecting all worksheets of a workbook neeraj Excel Discussion (Misc queries) 14 May 30th 06 09:46 PM
Copy Worksheets from one Workbook to Another halem2 Excel Worksheet Functions 3 March 25th 06 06:04 AM
Linking 3 closed worksheets to master workbook template fabiano Excel Worksheet Functions 1 March 22nd 06 05:49 PM
Select sheet tabs in workbook & save to separate workbook files stratocaster Excel Worksheet Functions 2 March 1st 06 03:35 PM
transferring data between 2 worksheets in same workbook bigdaddy3 Excel Worksheet Functions 0 February 28th 06 10:55 AM


All times are GMT +1. The time now is 05:50 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"