Spreadsheet redesigner

Let’s view the macros, which can redesign a table with data into another format. This format gives us to make Pivot tables.

From     do    

Open menu Service - Macros - Visual Basic Editor, insert new module (menu Insert - Module) and copy text of this macro there:

Sub Redesigner()
    Dim InVal As Variant
    Dim OutVal() As Variant
    Dim j, k, i As Long
    Dim NewSheet
    i = 1
    InVal = Selection.Formula
    ReDim OutVal(1 To Selection.Count, 1 To 3)
    For j = 2 To UBound(InVal, 1)
        For k = 2 To UBound(InVal, 2)
            If InVal(j, k) <> "" Then
                OutVal(i, 1) = InVal(j, 1)
                OutVal(i, 2) = InVal(1, k)
                OutVal(i, 3) = InVal(j, k)
                i = i + 1
            End If
        Next k
    Next j
    Set NewSheet = Worksheets.Add
    NewSheet.Range("A1").Resize(UBound(OutVal, 1), 3).Value = OutVal
End Sub 

Then close the Visual Basic Editor, return to Excel, select all table (also hat and first column with month) and run our macro through menu Tools - Macro – Macros (ALT+F8).

The macro inserts a new sheet in the workbook and then pastes our spreadsheet in a new format. With such table you can do any analysis in Excel.