Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() "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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Protecting all worksheets of a workbook | Excel Discussion (Misc queries) | |||
Copy Worksheets from one Workbook to Another | Excel Worksheet Functions | |||
Linking 3 closed worksheets to master workbook template | Excel Worksheet Functions | |||
Select sheet tabs in workbook & save to separate workbook files | Excel Worksheet Functions | |||
transferring data between 2 worksheets in same workbook | Excel Worksheet Functions |