Aqui está uma foto do VBA:
Option Explicit
Sub rearrange()
Dim aValues As Variant
Dim i As Integer, j As Integer
Dim lRow As Long
'store the values in an array
aValues = Worksheets("Sheet1").Range("A1:O5").Value
lRow = 1
With Worksheets("Sheet2")
For i = 1 To UBound(aValues, 1)
For j = 1 To UBound(aValues, 2) Step 3
.Cells(lRow, 1).Value = aValues(i, j)
.Cells(lRow, 2).Value = aValues(i, j + 1)
.Cells(lRow, 3).Value = aValues(i, j + 2)
lRow = lRow + 1
Next j
Next i
End With
End Sub