i need to add all the cells' contents after cell (A14) for sheet2 till sheet13 within the same workbook (the range of data is unknown it depends on external source) and the name of each sheet should appear before the data in the summary sheet as title.
Any help would be much appreciated.
Sub Copy_Sheets_To_Master()
Application.ScreenUpdating = False
Dim i As Long
Dim ans As String
Dim Lastrow As Long
Dim Lastrowa As Long
Dim Lastrowd As Long
For i = 2 To Sheets.Count
ans = Sheets(i).Name
Lastrowa = Sheets(i).Cells(Rows.Count, "A").End(xlUp).Row
Sheets(i).Range("A14" & Lastrowa).Copy Sheets("Master").Range("A" & Lastrow)
Lastrowd = Sheets("Master").Cells(Rows.Count, "A").End(xlUp).Row
Sheets("Master").Range("D" & Lastrow & ":D" & Lastrowd).Value = ans
Lastrow = Sheets("Master").Cells(Rows.Count, "A").End(xlUp).Row + 1
Next
Application.ScreenUpdating = True
End Sub
cheers,