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 transpose / convert columns and rows into single column?

When you use Excel worksheet, sometimes, you will meet this problem: how could you convert or transpose a range of data into a single column? (See the following screenshots:) Now, I introduce three quick tricks for you to solve this problem.

Transpose/Convert columns and rows into single column with formula

Transpose/Convert columns and rows into single column with VBA code

Transpose/Convert columns and rows into single column with Kutools for Excelgood idea3

Quickly transpose range to a column/row/ or vice versa in Excel

In some cases, you may need to transpose a range of cells into one column or a row, or vice versa, convert a column or a row into multiple rows and columns in Excel sheet. Do you have any quick way to solve it? Here the Transpose Range function in Kutools for Excel can handle all above jobs easily.Click for free full-featured trial in 60 days!
doc1
 
Kutools for Excel: with more than 300 handy Excel add-ins, free to try with no limitation in 60 days.

  Transpose/Convert columns and rows into single column with formula

Tabbed browsing & editing multiple Excel workbooks/Word documents as Firefox, Chrome, Internet Explore 10!

You may be familiar to view multiple webpages in Firefox/Chrome/IE, and switch between them by clicking corresponding tabs easily. Here, Office Tab supports similar processing, which allow you to browse multiple Excel workbooks or Word documents in one Excel window or Word window, and easily switch between them by clicking their tabs. Click for free 45-day trial of Office Tab!

ot excel

The following long formula can help you quickly transpose a range of data into a column, please do as this:

1. First, define a range name for your range of data, select the range data that you want to convert, right click and choose Define Name form the context menu. In the New Name dialog box, enter the range name you want. Then click OK. See screenshot:

2. After specify the range name, then click a blank cell, in this example, I will click cell E1, and then input this formula: =INDEX(MyData,1+INT((ROW(A1)-1)/COLUMNS(MyData)),MOD(ROW(A1)-1+COLUMNS(MyData),COLUMNS(MyData))+1).

Note: MyData is the range name of the selected data, you can change it as you need.

3. Then drag the formula down to the cell until the error information is displayed. All the data in the range has been transposed into a single column. See screenshot:


  Transpose/Convert columns and rows into single column with VBA code

With the following VBA code, you can also join the multiple columns and rows into a single column.

1. Hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and paste the following code in the Module window.

Sub ConvertRangeToColumn()
'Updateby20131126
Dim Range1 As Range, Range2 As Range, Rng As Range
Dim rowIndex As Integer
xTitleId = "KutoolsforExcel"
Set Range1 = Application.Selection
Set Range1 = Application.InputBox("Source Ranges:", xTitleId, Range1.Address, Type:=8)
Set Range2 = Application.InputBox("Convert to (single cell):", xTitleId, Type:=8)
rowIndex = 0
Application.ScreenUpdating = False
For Each Rng In Range1.Rows
    Rng.Copy
    Range2.Offset(rowIndex, 0).PasteSpecial Paste:=xlPasteAll, Transpose:=True
    rowIndex = rowIndex + Rng.Columns.Count
Next
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub

3. Press F5 key to run the code, and a dialog is displayed for you to select a range to convert. See screenshot:

4. Then click Ok, and another dialog is displayed to select a singel cell to put out the result, see screenshot:

5. And click Ok, then the cell contents of the range are converted to a list of a column, see screenshot:

doc-convert-range-to-column11


  Transpose/Convert columns and rows into single column with Kutools for Excel

Maybe the formula is too long to remember and the VBA code has some limitation for you, in this situation, please don’t worry, here I will introduce you an easier and more multifunctional tool-Kutools for Excel, with its Transform Range utility, and you can solve this problem quickly and conveniently.

  Kutools for Excel, with more than 300 handy functions, makes your jobs more easier. 

After installing Kutools for Excel, please do as below:(Free Download Kutools for Excel Now!)

1. Select the range that you want to transpose.

2. Click Kutools > Transform Range, see screenshot:

doc convert range to column 12

3. In the Transform Range dialog box, select Range to single column option, see screenshot:

doc convert range to column 13

4. Then click OK, and specify a cell to put the result from the pop out box.

doc convert range to column 14

5. Click OK, and the multiple columns and rows data has been transposed into a one column.
doc convert range to column 15

If you want to convert a column to a range with fixed rows, you also can use the Transform Range function to quickly handle it.
doc convert range to column 16


  Transpose cross table to list table with Kutools for Excel

If you have a cross table needed to be converted to a list table as below screenshot show, except retyping the data one by one, you also can use Kutools for Excel’s Transpose Table Dimensions utility to quickly convert between cross table and list in Excel.
doc convert range to column 19

After installing Kutools for Excel, please do as below:(Free Download Kutools for Excel Now!)

1. Select the cross table you want to convert to list, click Kutools > Range > Transpose Table Dimensions.
doc convert range to column 17

2. In Transpose Table Dimension dialog, check Cross table to list option on Transpose type section, select a cell to place the new format table.
doc convert range to column 18

3. Click Ok, now the cross table has been converted to list.


Related articles:

How to change row to column in Excel?

How to transpose / convert a single column to multiple columns in Excel?

How to transpose / convert columns and rows into single row?



Recommended Productivity Tools

Office Tab

gold star1 Bring handy tabs to Excel and other Office software, just like Chrome, Firefox and new Internet Explorer.

Kutools for Excel

gold star1 Amazing! Increase your productivity in 5 minutes. Don't need any special skills, save two hours every day!

gold star1 300 New Features for Excel, Make Excel Much Easy and Powerful:

  • Merge Cell/Rows/Columns without Losing Data.
  • Combine and Consolidate Multiple Sheets and Workbooks.
  • Compare Ranges, Copy Multiple Ranges, Convert Text to Date, Unit and Currency Conversion.
  • Count by Colors, Paging Subtotals, Advanced Sort and Super Filter,
  • More Select/Insert/Delete/Text/Format/Link/Comment/Workbooks/Worksheets Tools...

Screen shot of Kutools for Excel

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.
    Dana · 2 months ago
    thanks a lot; beautifull :-)
  • To post as a guest, your comment is unpublished.
    Philippe · 7 months ago
    Worked like a charm. Thanks a lot
  • To post as a guest, your comment is unpublished.
    deep · 9 months ago
    thanxs you have reduced my too much time....wonderful
  • To post as a guest, your comment is unpublished.
    NL · 10 months ago
    What if the table you start with has a range of values that is different for each row? Example: Say the table doesn't have FF, KK and LL, how do you make a single column from that table without doing them above example by hand?
    • To post as a guest, your comment is unpublished.
      Sunny · 9 months ago
      Just try above methods, if they cannot work, please tell me and upload your data as a picture to give some details
  • To post as a guest, your comment is unpublished.
    YO · 10 months ago
    THAT'S AMAZING! THANKYOU