Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Blueluck
 
Posts: n/a
Default Combine multiple sheets into one sheet?

I have a spreadsheet with about 200 sheets in it, and I would like to have
all of the data on one sheet. All of the sheets are formatted the same, with
identical column headings but different data on each row.

Without cutting and pasting 200 times, how can I get all of my rows onto one
worksheet?

Thank your for any help,
Steve
  #2   Report Post  
Mangesh Yadav
 
Posts: n/a
Default

Well, the safest way is to have a small macro do it, but since you have
posted this in the misc section, if you give details as to the sheet names,
the number of rows in each sheet, then with a formula you could simply drag
down and copy in the summary sheet, and then drag right to copy the columns.

Mangesh



"Blueluck" wrote in message
...
I have a spreadsheet with about 200 sheets in it, and I would like to have
all of the data on one sheet. All of the sheets are formatted the same,

with
identical column headings but different data on each row.

Without cutting and pasting 200 times, how can I get all of my rows onto

one
worksheet?

Thank your for any help,
Steve



  #3   Report Post  
Pank
 
Posts: n/a
Default

Blueluck,

I asked the same question some time again as was assisted by a gentleman
call Dave Peterson (Thanks Dave)

Dave kindly supplied the following which I am sure will do the job that you
want.

I have inserted comments which start ===READ, which you will have to review
and take the necessary action(s).

To copy the macro, open up your workbook, depress ALT+F8, call the macro
merging copy it and run it.

Good Luck

HTH

Pank


Sub Merging()

Dim wks As Worksheet
Dim DestCell As Range
Dim newWks As Worksheet
Dim HeadersAreDone As Boolean
Dim mySelectedSheets As Object
Dim myRngToCopy As Range

Set mySelectedSheets = ActiveWindow.SelectedSheets
ActiveWorkbook.Worksheets(1).Select


€˜===Read Iin my example I only wanted to merge 3 sheets.
€˜If you want all sheets select the first sheet tab depress the right mouse
key and select ALL SHEETS. Get rid of the following if up to the endif

If mySelectedSheets.Count < 3 Then
MsgBox "Please Group exactly 3 sheets before you run this macro!"
Exit Sub
End If

'MsgBox "Merging selected spreadsheets into 1 sheet - Select OK"

Set newWks = Workbooks.Add(1).Worksheets(1)

HeadersAreDone = False

€˜in my example my worksheet was protected and hence the following statement.
ActiveWorkbook.Unprotect

For Each wks In mySelectedSheets
With wks
If HeadersAreDone = True Then
'do nothing
Else
€˜===Read In my example I had headings in rows 1 & 2,
'for both rows 1 & 2, use .rows("1:2").copy _
'instead of the next line
.Rows(2).Copy _
Destination:=newWks.Range("a1")
HeadersAreDone = True
Set DestCell = newWks.Range("a2")
End If

€˜===Read In my example my worksheet was protected and hence the following
statement (i.e just unprotect.)

.Unprotect Password:=""
.Range("a3", .Cells.SpecialCells(xlCellTypeLastCell)).Copy
DestCell.PasteSpecial Paste:=xlPasteValues
.Protect Password:=""

With newWks
Set DestCell = .Cells(.Rows.Count, "A").End(xlUp).Offset(1, 0)
End With

End With
Next wks
End Sub



"Mangesh Yadav" wrote:

Well, the safest way is to have a small macro do it, but since you have
posted this in the misc section, if you give details as to the sheet names,
the number of rows in each sheet, then with a formula you could simply drag
down and copy in the summary sheet, and then drag right to copy the columns.

Mangesh



"Blueluck" wrote in message
...
I have a spreadsheet with about 200 sheets in it, and I would like to have
all of the data on one sheet. All of the sheets are formatted the same,

with
identical column headings but different data on each row.

Without cutting and pasting 200 times, how can I get all of my rows onto

one
worksheet?

Thank your for any help,
Steve




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
Linking References from Multiple Sheets to One Summary Sheet Kim Setting up and Configuration of Excel 3 May 5th 05 04:56 PM
saving excel with multiple sheets, but won't save to proper sheet jimlead1 Excel Discussion (Misc queries) 0 May 4th 05 06:36 PM
Copying multiple sheets from one book 2 another and undertake spec Pank Mehta Excel Discussion (Misc queries) 14 March 16th 05 04:41 PM
Linking sheets to a summary sheet in workbook gambinijr Excel Discussion (Misc queries) 4 December 16th 04 08:13 PM
linking multiple sheets to a summary sheet greg g Excel Discussion (Misc queries) 1 December 16th 04 07:43 AM


All times are GMT +1. The time now is 03:56 AM.

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"