vba copy and paste data from worksheet

tinner777

New Member
Joined
Sep 23, 2017
Messages
13
Hi,

i have a table that is 26 column's long. This table is then replicated 52 times to form a year. I input data into rows 7 - 14 (1 week plus a misc column).

Is there any way I can copy just the data for the whole 52 weeks?

Thanks
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
you can try the following codes which summarizes all sheets into a summary sheet with corresponding sheet names in column A. Hope that helps.

Sub TINNER()
Dim a As Integer, x As Integer
Sheets.Add.Name = "summary"
For a = 1 To Sheets.Count
Sheets(a).UsedRange.Copy
x = Sheets("summary").Cells(Rows.Count, 2).End(xlUp).Row + 2
Sheets("summary").Range("A" & x - 1) = Sheets(a).Name
Sheets("summary").Range("B" & x).PasteSpecial
End If
MsgBox "complete"
End Sub

ravishankar
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,197
Members
453,022
Latest member
RobertV1609

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top