Option Explicit
Sub gpeCOPY()
Dim Sh As Worksheet, dRng As Range, sRng As Range
Dim Col As Byte, Dg As Integer, Cot As Double
Dim MyName As String
Application.ScreenUpdating = False
MyName = "Front body1RoofSide1Side2Side3"
Set dRng = Sheet2.Range("iu7").End(xlToLeft).Offset(, 1)
Cot = dRng.Column
For Each Sh In ThisWorkbook.Worksheets
If InStr(MyName, Sh.Name) Then
Sh.Range("BX79:DC80").COPY
dRng.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
Set dRng = Sheet2.Cells(165, Cot).End(xlUp).Offset(1)
End If
1 GoTo GPE
If Sh.Name = "Roof" Then
Sh.Range("BX79:DC80").COPY
dRng.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
Set dRng = Sheet2.Cells(165, Cot).End(xlUp).Offset(1)
End If
If Sh.Name = "Side1" Then
Sh.Range("BX79:DC80").COPY
dRng.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
Set dRng = Sheet2.Cells(165, Cot).End(xlUp).Offset(1)
End If
If Sh.Name = "Side2" Then
Sh.Range("BX79:DC80").COPY
dRng.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
Set dRng = Sheet2.Cells(165, Cot).End(xlUp).Offset(1)
End If
If Sh.Name = "Side3" Then
Sh.Range("BX79:DC80").COPY
dRng.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
Set dRng = Sheet2.Cells(165, Cot).End(xlUp).Offset(1)
End If
9 GPE:
Next Sh
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub