Excel/Combine multiple tables/spreadsheets
I have over 25 excel tables, each table has at least 15 sheets and I need to find a way to combine different sheets from those different tables into a new single table. Is it even possible?
I DO NOT want to consolidate and bring total dollar amounts from those tables.
Is there any way I can do that with a formula, macro, function or anything else besides the time consuming copy/paste function ?
Thanks in advance
This can only be done easily using a macro.
The code below assumes you have a worksheet called "AllData" and opens all files you select, copies all content of all sheets into that worksheet:
Dim lCount As Long
Dim vFileName As Variant
Dim sPath As String
Dim lFilecount As Long
sPath = "c:\windows\temp\"
vFileName = Application.GetOpenFilename("Microsoft Excel files (*.xls*),*.xls*", , "Please select the file(s) to open", , True)
If TypeName(vFileName) = "Boolean" Then Exit Sub
For lCount = LBound(vFileName) To UBound(vFileName)
Sub ProcessFile(sFileName As String)
Dim oSh As Worksheet
For Each oSh In Worksheets
.Range("A" & .Rows.Count).End(xlUp).Offset(1).PasteSpecial xlPasteValuesAndNumberFormats
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here