Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combining multiple sheets onto one
I wrote the following code to combine multiple sheets - it worked fine, now,
however the machine hangs and I have to restart Excel, can anyone show more a more elegant (less resource hungry) way of achieving my aim? Many thanks in advance ******** Code Sample ********** sub Build_Summary() 'Now build summary sheet by copying in all the workstream sheets Sheets("Summary").Select Range("a1:bb5000").Select Selection.Clear Sheets("PMO").Select Rows("4:2000").Select Selection.Copy Sheets("Summary").Select Range("a1").Select ActiveSheet.Paste sheetname = "BC": GoSub copysheet sheetname = "CSM": GoSub copysheet sheetname = "OTC": GoSub copysheet sheetname = "PTP": GoSub copysheet sheetname = "SCM": GoSub copysheet sheetname = "MAN": GoSub copysheet sheetname = "CM": GoSub copysheet sheetname = "DS": GoSub copysheet GoTo finished2 copysheet: Sheets(sheetname).Select Rows("5:2000").Select Selection.Copy Sheets("Summary").Select Range("A5").Select Selection.End(xlDown).Select ActiveCell.Offset(1, 0).Select ActiveSheet.Paste Return finished2: End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Combining multiple spread sheets into one | Excel Discussion (Misc queries) | |||
combining multiple sheets into one | Excel Worksheet Functions | |||
Combining multiple sheets | Excel Discussion (Misc queries) | |||
combining multiple sheets | Excel Worksheet Functions | |||
Combining data from multiple sheets | Excel Discussion (Misc queries) |