Skip to main content

How to reverse a pivot table in Excel?

Author: Sun Last Modified: 2020-05-25
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

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.

1. Select the base data, and click Kutools > Range > 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.


Quickly transpose Cross table to list or vice versa

While you receiving a sheet with cross table which you need to convert to list table, how can you quickly deal with it? With Kutools fro Excel's Transpose Table Dimensions utility, you can convert cross dimensions table to three demensions table or vice versa as quickly as you can.   Click for 30-day full-featured free trial!
doc transpose cross to list
 
Kutools for Excel: with more than 300 handy Excel add-ins, free to try with no limitation in 30 days.

Relative Articles:

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...

Description


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!
Comments (1)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
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
There are no comments posted here yet
Leave your comments
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations