Assuming no blanks interspersed amongst the headers then:
Public Sub Transpose()
Dim lngRw As Long, lngRwOut As Long, wsIn As Worksheet, wsOut As Worksheet, lngCols As Long
Set wsIn = Sheets("RawData")
Set wsOut = Sheets("Sheet1")
wsIn.Activate
lngRwOut = 2
lngCols = Cells(1, Columns.Count).End(xlToLeft).Column - 1
For lngRw = lngRwOut To wsIn.Cells(Rows.Count, "A").End(xlUp).Row Step 1
wsOut.Cells(lngRwOut, "A").Resize(lngCols).Value = Application.Transpose(wsIn.Range(Cells(1, "B"), Cells(1, lngCols + 1)))
wsOut.Cells(lngRwOut, "B").Resize(lngCols).Value = wsIn.Cells(lngRw, "A")
wsOut.Cells(lngRwOut, "C").Resize(lngCols).Value = Application.Transpose(wsIn.Cells(lngRw, "B").Resize(, lngCols).Value)
lngRwOut = lngRwOut + lngCols
Next lngRw
Set wsIn = Nothing
Set wsOut = Nothing
End Sub
Bookmarks