How to covert cross table (2-dimensional table) to list in Excel?

Do you know how to convert a cross table (two dimensional table) to a list table (one dimensional table) in Microsoft Excel? For some reasons, you may need to convert a table (with row headings and column headings) to a flat list in Excel. The following tricks can help you convert a cross table to flat list easily and quickly:

Supposing you have a cross table and need to convert it to a list as follows.

doc-transpose-table-list-1

arrow-big

doc-transpose-table-list-2
Cross table (with row headings and columns headings) A list table (one dimensional table)

Hot
Amazing! Using Tabs in Excel like Firefox, Chrome, Internet Explore 10!

Learn more Free download

arrow blue right bubbleConvert cross table to list in Excel with VBA

The following VBA macro can help you quickly convert all cross tables in active worksheet to flat lists.

Step 1: Hold down the Alt + F11 keys in Excel, and it opens the Microsoft Visual Basic for Applications window.

Step 2: Click Insert >> Module, and paste the following macro in the Module Window.

Sub ConvertTableToList()
Const TEST_COLUMN As String = "A"
Dim i As Long, j As Long
Dim iLastRow As Long
Dim iLastCol As Long
Application.ScreenUpdating = False
With ActiveSheet
iLastRow = .Cells(.Rows.Count, TEST_COLUMN).End(xlUp).Row
For i = iLastRow To 2 Step -1
iLastCol = .Cells(i, .Columns.Count).End(xlToLeft).Column
For j = iLastCol To 3 Step -1
.Rows(i + 1).Insert
.Cells(i + 1, 2).Value = .Cells(i, j).Value
.Cells(i, j).Value = ""
Next j
Next i
.Rows(1).Delete
End With
Application.ScreenUpdating = True
End Sub

Step 3: Click the F5 key to run this macro.

Then you will see the converted list showing as following screen shot:

doc-transpose-table-list-3

Note: this VBA macro loses some data of original table, such as headers, or others. In this case, the headers (Name, Grade, and Class) are lost.


arrow blue right bubbleConvert cross tables to lists in Excel with Kutools for Excel

If you have Kutools for Excel installed, you can use its Transpose Table Dimensions tool to convert cross tables to flat list quickly.

Kutools for Excel includes more than 100 handy Excel tools. Free to try with no limitation in 30 days. Get it Now.

Step 1: Select the table which you will convert it to a list.

Step 2: Click the Kutools >> Modify >> Transpose Table Dimension. See the following screen shot:

doc-transpose-table-list-4

Step 3: In Transpose Table Dimensions dialog box, check the Cross table to list option, and select the Results range with clicking the button.

doc-transpose-table-list-5

Step 4: Click OK button.

Then you will see the original table is converted into a flat list as following screen shot shows:

doc-transpose-table-list-2


Kutools for Excel

More than 120 Advanced Functions for Excel 2013, 2010, 2007 and Office 365.

screen shot

btn read more     btn download     btn purchase