Если вы предпочитаете выполнить задачу с кодом VBA, попробуйте:
Sub test2()
Dim i As Long, LastCol As Long, LastRow As Long, j As Long, AddCol As Long, LastRowNew As Long
Dim SiteName As String
With ThisWorkbook.Worksheets("Sheet1")
LastCol = .Cells(2, .Columns.Count).End(xlToLeft).Column
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
AddCol = 3
For i = 3 To LastCol
.Cells(1, LastCol + AddCol).Value = .Cells(1, i).Value
For j = 2 To LastRow
If .Cells(j, i).Value <> 0 Then
LastRowNew = .Cells(.Rows.Count, (LastCol + AddCol)).End(xlUp).Row
.Cells(LastRowNew + 1, LastCol + AddCol).Value = .Cells(j, i).Value
.Cells(LastRowNew + 1, (LastCol + AddCol) - 1).Value = .Cells(j, 2).Value
End If
Next j
AddCol = AddCol + 3
Next i
End With
End Sub
Вывод: