There is no "Statatest" sheet on your example workbook. Make a sheet called Statatest, copy columns AB from "Sheet6" (so it looks nice) and run this code. It matches what you had on sheet 6.
Sub Copy_Data()
Dim fWS As Worksheet: Set fWS = Sheets("Statatest")
Dim ws1 As Worksheet: Set ws1 = Sheets("Productivity")
Dim ws As Worksheet
Dim iCol As Long, LC As Long, LR As Long, aCount As Long
Application.ScreenUpdating = False
For Each ws In Worksheets
Select Case ws.Name
Case Is = fWS.Name
'do nothing
Case Is = ws1.Name
aCount = 3
ws1.Range("B6:B" & ws1.Range("B" & Rows.Count).End(xlUp).Row).Copy
fWS.Range("C1").PasteSpecial xlPasteAll, Transpose:=True
LC = ws1.Cells(10, Columns.Count).End(xlToLeft).Column
If LC > 1 Then
For iCol = 3 To LC
LR = ws1.Cells(Rows.Count, iCol).End(xlUp).Row
ws1.Range(ws1.Cells(10, iCol), ws1.Cells(LR, iCol)).Copy
fWS.Range("C" & aCount).PasteSpecial xlPasteAll, Transpose:=True 'every 3rd row
aCount = aCount + 3
Next iCol
End If
Case Is = "Terms of Trade"
aCount = 4
LC = ws.Cells(10, Columns.Count).End(xlToLeft).Column
If LC > 1 Then
For iCol = 2 To LC
LR = ws.Cells(Rows.Count, iCol).End(xlUp).Row
ws.Range(ws.Cells(10, iCol), ws.Cells(LR, iCol)).Copy
fWS.Range("C" & aCount).PasteSpecial xlPasteAll, Transpose:=True 'every 3rd row
aCount = aCount + 3
Next iCol
End If
Case Is = "Gross Government Debt"
aCount = 2
LC = ws.Cells(10, Columns.Count).End(xlToLeft).Column
If LC > 1 Then
For iCol = 2 To LC
LR = ws.Cells(Rows.Count, iCol).End(xlUp).Row
ws.Range(ws.Cells(10, iCol), ws.Cells(LR, iCol)).Copy
fWS.Range("C" & aCount).PasteSpecial xlPasteAll, Transpose:=True 'every 3rd row
aCount = aCount + 3
Next iCol
End If
End Select
Next ws
Application.ScreenUpdating = True
End Sub
Bookmarks