Copy all sheets into 1
Hello. Anyone know how to take every visible sheet in a workbook, and paste
each sheet (one under the other) onto a single sheet called "Upload"? Thanks! |
Copy all sheets into 1
This will do it - but goes wrong if the Upload sheet has a history, i.e. if
Ctrl-End in Upload takes you anywhere other than the first cell (to reset this, clear all of the Upload sheet and then close and open the file). Sub PasteAll() Dim mySheet As Worksheet For Each mySheet In Worksheets If mySheet.Name < "Upload" Then mySheet.Select Range(Range("A1"), ActiveCell.SpecialCells(xlLastCell)).Copy Worksheets("Upload").Select Range("A1").Select ActiveCell.SpecialCells(xlLastCell).Select Selection.End(xlToLeft).Select ActiveCell.Offset(1, 0).Select ActiveSheet.Paste End If Next End Sub "Steph" wrote: Hello. Anyone know how to take every visible sheet in a workbook, and paste each sheet (one under the other) onto a single sheet called "Upload"? Thanks! |
All times are GMT +1. The time now is 12:44 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com