ItsAllBee,
Something like this should work for you. It wasn't readily apparent what column in 'Sheet1' populates which fields in 'Sheet2'. You should be able to replace the text entries ("Date", "Order Ref", etc) with the actual cell references. I included how to do so as comments in the code:
Sub tgr()
Dim wsData As Worksheet
Dim wsTemp As Worksheet
Dim LastRow As Long
Dim LastCol As Long
Dim rIndex As Long
Dim cIndex As Long
Set wsData = Sheets("Sheet1")
Set wsTemp = Sheets("Sheet2")
LastRow = wsData.Cells(Rows.Count, "A").End(xlUp).Row
If LastRow < 4 Then Exit Sub
For rIndex = 4 To LastRow
LastCol = wsData.Cells(rIndex, Columns.Count).End(xlToLeft).Column
If LastCol > 12 Then
wsData.Copy After:=Sheets(Sheets.Count)
With ActiveSheet
'Replace these with the cell reference that it should be
' For example, if the Date is in column E of 'Sheet1' then
' instead of "Date" it should be wsData.Cells(rIndex, "E").Value
.Range("E1").Value = "Date"
.Range("B2").Value = "Order Ref"
.Range("E3").Value = "Model"
.Range("B4").Value = "Base Operating System"
.Range("B5").Value = "Target Country"
.Range("B6").Value = "Location Code"
.Range("B7").Value = "SOE By"
For cIndex = 13 To LastCol
.Range("A" & cIndex - 2).Value = wsData.Cells(rIndex, cIndex).Value
Next cIndex
End With
Next rIndex
End Sub
Bookmarks