Sub TransformData2()
Dim i As Long, j As Long, Lr1 As Long, Arr As Variant, F As Long, Lr2 As Long
Dim Sh1 As Worksheet, Sh2 As Worksheet, Nval As Variant
Set Sh1 = Sheets("Data")
Set Sh2 = Sheets("Layout")
'Set MyRange = Sh1.Range("A20:J24")
Lr1 = Sh1.Cells(Rows.Count, 1).End(xlUp).Row
Sh2.Cells((i + 1) * 6 / 2 + 3, 1).Value = "SP"
Sh2.Cells((i + 1) * 6 / 2 + 3, 3).Value = "DECK"
Sh2.Cells((i + 1) * 6 / 2 + 3, 6).Value = "SP"
Sh2.Cells((i + 1) * 6 / 2 + 3, 8).Value = "DECK"
i = 1
Sh2.Cells((i + 1) * 4 / 2 + 2, 2).Value = Sh1.Cells(20, i) 'Header B6
Sh2.Cells((i + 1) * 4 / 2 + 2, 7).Value = Sh1.Cells(20, i + 1) 'header G6
Sh2.Cells((i + 1) * 5 / 2 + 2, 1).Value = Sh1.Cells(21, i)
Sh2.Cells((i + 1) * 6 / 2 + 2, 1).Value = Sh1.Cells(22, i)
Sh2.Cells((i + 1) * 7 / 2 + 2, 1).Value = Sh1.Cells(23, i)
Sh2.Cells((i + 1) * 8 / 2 + 2, 1).Value = Sh1.Cells(24, i)
Sh2.Cells((i + 1) * 5 / 2 + 2, 6).Value = Sh1.Cells(21, i + 1)
Sh2.Cells((i + 1) * 6 / 2 + 2, 6).Value = Sh1.Cells(22, i + 1)
Sh2.Cells((i + 1) * 7 / 2 + 2, 6).Value = Sh1.Cells(23, i + 1)
Sh2.Cells((i + 1) * 8 / 2 + 2, 6).Value = Sh1.Cells(24, i + 1)
For i = 3 To 10 Step 2
Sh2.Cells((i + 1) * 6 / 2, 2).Value = Sh1.Cells(20, i)
Sh2.Cells((i + 1) * 6 / 2, 7).Value = Sh1.Cells(20, i + 1)
Sh2.Cells((i + 1) * 5 / 2 + 3, 1).Value = Sh1.Cells(21, i)
Sh2.Cells((i + 1) * 5 / 2 + 4, 1).Value = Sh1.Cells(22, i)
Sh2.Cells((i + 1) * 5 / 2 + 5, 1).Value = Sh1.Cells(23, i)
Sh2.Cells((i + 1) * 5 / 2 + 6, 1).Value = Sh1.Cells(24, i)
Sh2.Cells((i + 1) * 5 / 2 + 3, 6).Value = Sh1.Cells(21, i + 1)
Sh2.Cells((i + 1) * 5 / 2 + 4, 6).Value = Sh1.Cells(22, i + 1)
Sh2.Cells((i + 1) * 5 / 2 + 5, 6).Value = Sh1.Cells(23, i + 1)
Sh2.Cells((i + 1) * 5 / 2 + 6, 6).Value = Sh1.Cells(24, i + 1)
Next i
End Sub