Este código VBA deve funcionar:
Public Sub summary()
Dim wk As Workbook
Dim ws, ws1 As Worksheet
Set wk = ThisWorkbook
Set ws = wk.Sheets("Sheet1")
Set ws1 = wk.Sheets("Sheet2")
ws1Columns = 1
ws1Rows = 1
maxColumns = ws.Cells(1, Columns.Count).End(xlToLeft).Column
For i = 1 To maxColumns Step 2
theRows = 1
theCell = ws.Cells(theRows, i)
theCell2 = ws.Cells(theRows, i + 1)
While theCell <> ""
If theCell2 <> "" Then
ws1.Cells(ws1Rows, ws1Columns) = theCell
ws1.Cells(ws1Rows, ws1Columns + 1) = theCell2
ws.Cells(theRows, i).Copy
ws1.Cells(ws1Rows, ws1Columns).PasteSpecial Paste:=xlPasteFormats
ws.Cells(theRows, i + 1).Copy
ws1.Cells(ws1Rows, ws1Columns + 1).PasteSpecial Paste:=xlPasteFormats
ws1Rows = ws1Rows + 1
End If
theRows = theRows + 1
theCell = ws.Cells(theRows, i)
theCell2 = ws.Cells(theRows, i + 1)
Wend
Next i
End Sub
Abra VBA / Macros com ALT + F11, em ThisWorkbook adicione um novo módulo e cole este código.
Execute a macro e, se os dados originais estiverem em Sheet1
, o resultado final será em Sheet2
.