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

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
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,215,992
Messages
6,128,170
Members
449,429
Latest member
ianharper68

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