Hi
I have found the following code that i believe will fetch data from multiple sheets and combine it in to one named "Rollup". This data is fetched from sheets named as per the standard excel format. However my sheets are being imported with the name of the file which they have come from for example:
FR1-22.11.2009.xls
RA12-22.11.2009.xls
The constant that will remain will be the date throughout the sheets names as the number of actual sheets present will vary. How would the code below be edited to reflect this naming convention? assuming the data is to be collated in to "rollup" and how would it be edited to pick out a specific cell or number of cells? at the minute it looks as though it just copies the whole sheet whereas i am looking to copy just specific cells in to "rollup".
Sub Combine()
Dim J As Integer
On Error Resume Next
Sheets(1).Select
Worksheets.Add ' add a sheet in first place
Sheets(1).Name = "Rollup"
' work through sheets
For J = 2 To Sheets.Count ' from sheet 2 to last sheet
Sheets(J).Activate ' make the sheet active
Range("A1").Select
Selection.CurrentRegion.Select ' select all cells in this sheets
' select all lines except title
Selection.Offset(1, 0).Resize(Selection.Rows.Count - 1).Select
' copy cells selected in the new sheet on last line
Selection.Copy Destination:=Sheets(1).Range("A65536").End(xlUp)(2)
Next
End Sub
Thanks for any help
Bookmarks