Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to reverse a pivot table in Excel?

doc-reverse-pivottable-1
Have you ever wanted to reverse or transpose the pivot table in Excel just like the below screenshots shown. Now I will tell you the quick ways to reverse a pivot table in Excel.
(11 steps)Reverse pivot table with PivotTable and PivotChart Wizard
(7 steps)Reverse pivot table with Kutools for Excel’s Transpose Table Dimensions good idea3

You maybe intested in this:

Transpose Table Dimensions(transpose a cross table to list, and vice versa.)

doc transpose cross to list

arrow blue right bubble Reverse pivot table with PivotTable and PivotChart Wizard


To reverse the pivot table, you need to open PivotTable and PivotChart Wizard dialog first and create a new pivot table in Excel.

1. Press Alt + D + P shortcut keys to open PivotTable and PivotChart Wizard dialog, then, check Multiple consolidation ranges option under Where is the data that you want to analyze section and PivotTable option under What kind of report do you want to create section.

Note: You can also add the PivotTabe and PivoChart Wizard command into the Quick Access Toolbar, and click to open the dialog.

doc-reverse-pivottable-2

2. Click Next to go to the next dialog to check I will create the page fields option, and click the Next.

doc-reverse-pivottable-3

3. Select your base data, then click Add to add the data range to the All ranges list. See screenshot:

doc-reverse-pivottable-4

4. Click Next to go to the last step of the Wizard, check the option you need under Where do you want to put the PivotTable report section. Then click Finish.

doc-reverse-pivottable-5

5. Now a new pivot table is created, and double click last cell at the right down corner of new Pivot table, then a new table is created in a new worksheet. See screenshots:
doc-reverse-pivottable-6

iv>

6. Then create a new pivot table based on this new table. Select the whole new table, and click Insert > PivotTable > PivotTable.

doc-reverse-pivottable-7

7. Then in the popping dialog, check the option you need under Choose where you want the PivotTable report to be placed section.

doc-reverse-pivottable-8

8. Click OK. Then a PivotTable Field List pane appears, and drag the Row and Column fields to the Row Labels section, and Value field to Values section. See screenshot:

doc-reverse-pivottable-9

9. Then click at any cell of the new pivot table, and go to the Design tab to click Report Layout > Show in Tabular Form.

doc-reverse-pivottable-10

10. Then go to click Report Layout again to click Repeat All Item Labels from the list. See screenshot:

doc-reverse-pivottable-11

Note: This is no Repeat All Item Labels command in the drop down list of Report Layout button in Excel 2007, just skip this step.

11. Click Design > Subtotals > Do Not Show Subtotals.

doc-reverse-pivottable-12

Now the pivot table is reversed. See screenshot:

doc-reverse-pivottable-13


arrow blue right bubble Reverse pivot table with Kutools for Excel’s Transpose Table Dimensions

With above way, there are so many steps to solve the task. To greatly improve your work efficiency and reduce the working hours, I suggest you reverse the pivot table with Kutools for Excel’s Transpose Table Dimensions feature.

Kutools for Excel, with more than 120 handy Excel functions, enhance your working efficiency and save your working time.

1. Select the base data, and click Kutools > Ranges Converter > Transpose Table Dimensions.

doc reverse pivottable 20

2. In the Transpose Table Dimensions dialog, check Cross table to list under Transpose type section, then select the cell you want to put the new table.

excel add-in tool for change 2d table to 1d

3. Click Ok to create a new table, and then insert headers above the new table. See screenshot:

doc-reverse-pivottable-16

4. Select the new table, including the headers, and click Insert > PivotTable > PivotTable, then in the Create PivotTable dialog, check the option you need under Choose where you want the PivotTable report to be placed section.

doc-reverse-pivottable-17

5. Click OK, and in PivotTable Field List pane, drag Row and Column fields to Row Labels section, and Value field to Values section.
doc-reverse-pivottable-9

6. Click any cell of the new pivot table and click Design > Report Layout > Show in Tabular Form, then click Report Layout again to click Repeat All Item Labels. See screenshots:

doc-reverse-pivottable-10doc-reverse-pivottable-11

Note: This is no Repeat All Item Labels command in the drop down list of Report Layout button in Excel 2007, just skip it.

7. Click Design > Subtotals > Do Not Show Subtotals.

doc-reverse-pivottable-12

Now the pivot table is reversed. See screenshot:

doc-reverse-pivottable-19

With Kutools for Excel’s Transpose Table Dimensions feature, you also can convert list table to cross table. Click here to know more information.

You maybe intested in this:

good idea4Combine Worksheets

In sometimes, you may be confused with consolidate or combine multiple sheets/ranges into one sheet or one workbook for some special work, but a powerful utility of Kutools for Excel, Combine Worksheets function can quickly help you handle this job.
doc combine

Relative Articles:


Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    King Storm · 25 days ago
    VBA code:

    Sub Unpivot()
    '
    Dim Rowlabel As Range
    Dim Columnlabel As Range
    Dim Pap As Range
    Dim Tabl As Range
    Dim i As Integer
    Dim j As Integer
    Dim a As Integer
    Dim b As Integer
    Dim Data As Range
    Dim k As Integer
    Dim Label As Range
    Dim pvtCache As PivotCache
    Dim pvt As PivotTable
    Dim SrcData As String
    '
    ActiveSheet.Copy Before:=Worksheets(1)
    Set Tabl = Selection
    For Each Pap In Tabl
    If Pap.MergeCells Then
    With Pap.MergeArea
    .UnMerge
    .Value = Pap.Value
    End With
    End If
    Next
    i = Application.InputBox("So dong chua label", "Hoang", i, Type:=2)
    j = Application.InputBox("So cot chua label", "Hoang", j, Type:=2)
    On Error Resume Next
    Sheets("Unpivot_Table").Delete
    Sheets.Add.Name = "Unpivot_Table"
    Set Pap = Range("Unpivot_Table!B2")
    b = Tabl.Rows.Count
    a = Tabl.Columns.Count
    Set Data = Range(Tabl.Cells(i + 1, j + 1), Tabl.Cells(b, a))
    Set Columnlabel = Range(Tabl.Cells(i + 1, 1), Tabl.Cells(b, j))
    Set Rowlabel = Range(Tabl.Cells(1, j + 1), Tabl.Cells(i, a))
    Pap.Select
    For Each Column In Data.Columns
    Column.Copy
    Selection.PasteSpecial Paste:=xlPasteValues
    Columnlabel.Copy
    Selection.Offset(0, 1).PasteSpecial Paste:=xlPasteValues
    Column.Copy
    Selection.Offset(b - i, -1).Select
    Next Column
    Pap.Offset(0, j + 1).Select
    For Each Column In Rowlabel.Columns
    Column.Copy
    Range(Selection, Selection.Offset(b - i - 1, 0)).PasteSpecial Paste:=xlPasteValues, Transpose:=True
    Selection.End(xlDown).Offset(1, 0).Select
    Next Column
    Set Label = Range(Pap.Offset(-1, 0), Pap.Offset(0, i + j + 1))
    For k = 1 To i + j + 1
    Label.Cells(1, k).Value = Application.InputBox(Label.Cells(2, k).Value & " la", "Hoang", k, Type:=2)
    Next
    Range(Pap.End(xlUp), Pap.End(xlDown).End(xlToRight)).Select
    SrcData = ActiveSheet.Name & "!" & Selection.Address
    On Error Resume Next
    Sheets("Pivot").Delete
    Sheets.Add.Name = "Pivot"
    Set pvtCache = ActiveWorkbook.PivotCaches.Create( _
    SourceType:=xlDatabase, _
    SourceData:=SrcData)
    Set pvt = pvtCache.CreatePivotTable( _
    TableDestination:="Pivot!" & Sheets("Pivot").Range("A3").Address(ReferenceStyle:=xlR1C1), _
    TableName:="PivotTable1")
    End Sub