Const startRow As Integer = 5
Const newSheet As String = "TransposedData"
Sub makeDownwards()
Dim row As Integer, ws As Worksheet, ows As Worksheet
Dim oRow As Integer, col As Integer, repNumber As Integer, i As Integer
Dim fName As String, sName As String, year As String, site As String, none As String, transect As String
row = startRow
Set ws = ActiveSheet
Set ows = ThisWorkbook.Worksheets.Add(after:=ActiveSheet)
ows.Name = newSheet
oRow = 2
ows.Range("A1").Resize(1, 6) = Split("Fish Name ,Fish Spicies ,Year ,Site ,None ,Transect", ",")
ows.Range("A1:F1").Font.Bold = True
ows.Range("A1:F1").BorderAround xlContinuous, xlThin
ows.Range("A1:F1").HorizontalAlignment = xlCenter
Do While (ws.Cells(row, 1) <> "")
row = row + 1
col = 3
fName = ws.Cells(row, 1)
sName = ws.Cells(row, 2)
Do While ws.Cells(1, col) <> ""
repNumber = ws.Cells(row, col).Value
year = ws.Cells(1, col)
side = ws.Cells(2, col)
none = ws.Cells(3, col)
transect = ws.Cells(4, col)
For i = 1 To repNumber
ows.Range("A" & oRow).Resize(1, 6) = Array(fName, sName, year, side, none, transect)
oRow = oRow + 1
Next
col = col + 1
Loop
Loop
End Sub