LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Combining Multilple Worksheets Into One

hi,

Am Thu, 9 Aug 2012 09:51:38 -0700 (PDT) schrieb djc:

I have an issue I think may be easy to solve, but I am a novice with VBA. I need macro that can combine multiple sheets into one sheet.

I have 300+ sheets all named 1-300+ (there are a few missing sheets within the range however). The good news is that each sheet is a template and I need to extract only the data in the range A13:P55.

I would like to extract A13:P55 from the first worksheet ?1? and place it in a sheet called ?Combined?.

The macro would then go to the next worksheet, and pull A13:P55 and put in that range in the ?Combined? tab below the data it from the previous worksheet.


try:
Sub Combine()
Dim LRow As Long
Dim wsh As Worksheet

For Each wsh In ThisWorkbook.Worksheets
LRow = Sheets("Combined").Cells(Rows.Count, 1).End(xlUp).Row + 1
With wsh
If .Name < "Combined" Then
.Range("A13:P55").Copy _
Destination:=Sheets("Combined").Range("A" & LRow)
End If
End With
Next
End Sub


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
 
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
combining worksheets antony Excel Worksheet Functions 0 July 1st 08 11:12 PM
Combining worksheets Steven Hunns New Users to Excel 1 January 10th 08 03:29 PM
Help searching and summing across multilple worksheets Joe Tapestry Excel Discussion (Misc queries) 7 March 17th 06 05:07 AM
Combining 2 or more worksheets Steve Lewington Excel Worksheet Functions 3 February 1st 06 05:36 PM
combining two worksheets into one KK[_4_] Excel Programming 3 January 9th 06 08:08 PM


All times are GMT +1. The time now is 10:43 PM.

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"