How to rows to columns in excel

If you have a worksheet with data in columns that you need to rotate to rearrange it in rows, use the Transpose feature. With it, you can quickly switch data from columns to rows, or vice versa.

For example, if your data looks like this, with Sales Regions in the column headings and and Quarters along the left side:

Regional data in columns

The Transpose feature will rearrange the table such that the Quarters are showing in the column headings and the Sales Regions can be seen on the left, like this:

Regional data in rows

Note: If your data is in an Excel table, the Transpose feature won’t be available. You can convert the table to a range first, or you can use the TRANSPOSE function to rotate the rows and columns.

Here’s how to do it:

  1. Select the range of data you want to rearrange, including any row or column labels, and press Ctrl+C.

    Note: Ensure that you copy the data to do this, since using the Cut command or Ctrl+X won’t work.

  2. Choose a new location in the worksheet where you want to paste the transposed table, ensuring that there is plenty of room to paste your data. The new table that you paste there will entirely overwrite any data / formatting that’s already there.

    Right-click over the top-left cell of where you want to paste the transposed table, then choose Transpose Tranpose button image.

    Paste Options menu

  3. After rotating the data successfully, you can delete the original table and the data in the new table will remain intact.

Tips for transposing your data

  • If your data includes formulas, Excel automatically updates them to match the new placement. Verify these formulas use absolute references—if they don’t, you can switch between relative, absolute, and mixed references before you rotate the data.

  • If you want to rotate your data frequently to view it from different angles, consider creating a PivotTable so that you can quickly pivot your data by dragging fields from the Rows area to the Columns area (or vice versa) in the PivotTable Field List.

You can paste data as transposed data within your workbook. Transpose reorients the content of copied cells when pasting. Data in rows is pasted into columns and vice versa.

An example of Paste Transpose

Here’s how you can transpose cell content:

  1. Copy the cell range.

  2. Select the empty cells where you want to paste the transposed data.

  3. On the Home tab, click the Paste icon, and select Paste Transpose.

How to Convert Rows to Columns in Excel?

There are two different methods for converting rows to columns in Excel, which are as follows:

  1. Method #1 – Transposing Rows to Columns Using Paste Special.
  2. Method #2 – Transposing Rows to Columns Using TRANSPOSE Formula.
Table of contents
  • How to Convert Rows to Columns in Excel?
    • #1 Using Paste Special
      • Example
    • #2 Using TRANSPOSE Formula
      • Example
    • Advantages
    • Disadvantages
    • Things to Remember
    • Recommended Articles

#1 Using Paste Special

It is an efficient method; it is easy to implement and saves time. Also, this method would be ideal if you want your original formatting to be copied.

You can download this Convert Rows to Columns Excel Template here – Convert Rows to Columns Excel Template

Example

For example, if you have below data of key industry players from various regions, it also shows their job roles as shown in figure1.

Name Jennifer Racheal Milos Costas Daniel Kevin
Country Spain England France Brazil Ireland Germany
Job Role CTO CEO Analyst Analyst Media Director
Domain Electronics Chemical Mechanical Aerospace Marketing Finance

In example 1, the players’ names are written in column form. Still, the list becomes too long, and the data entered also seems unorganized. Hence, we would change the rows to columns using paste special methodsPaste special in Excel allows you to paste partial aspects of the data copied. There are several ways to paste special in Excel, including right-clicking on the target cell and selecting paste special, or using a shortcut such as CTRL+ALT+V or ALT+E+S.read more.

The steps to convert rows to columns in Excel using the Paste Special method are as follows:

  1. Select the whole data which needs to be transformed or transposed. Then, Copy the selected data by simply pressing Ctrl + C keys.

    Convert Rows to Columns Example 1-1

  2. Select a blank cell and ensure it is outside the original data range. Paste the data by pressing the “Ctrl +V” keys starting at the first blank space or cell. Then, select the down arrow from the toolbar under the “Paste” option and select “Paste Transpose.” But the easy way is to right-click the blank you chose first to paste the data. Then, select “Paste Special” from it.

    Convert Rows to Columns Example 1-2

  3. Then, a “Paste Special” dialog box will appear from which select the “Transpose” option. And click “OK.”

    Convert Rows to Columns Example 1-3

  4. In the above figure, copy the data which needs to be transposed and then click on the down arrow of the Paste option and form the options select Transpose. (Paste-Transpose)

    Convert Rows to Columns Example 1-4
    It shows how the transpose function is performed to convert rows to columns.

    Convert Rows to Columns Example 1-5

#2 Using TRANSPOSE Formula

When a user wants to keep the same connections of the rotating table with the original table, it can use a transposing method using a formula. This method is also quicker in converting rows to columns in Excel. But, it does not keep the source formatting and links it to a transposed table.

Example

Consider the example below, as shown in figure 6, where it shows the company’s names, location, and the number of employees.

TRANSPOSE Formula Example 2

The steps to transpose rows to columns in excel using formula are as follows:

  • First, count the number of rows and columns in your original excel table. And then, select the same number of blank cells but ensure you have to transpose the rows to columns to choose the blank cells in the opposite direction. Like in example 2, the number of rows is 3, and the number of columns is 6. So, you will select 6 blank rows and 3 blank columns.

TRANSPOSE Formula Example 2-1

  • In the first empty cell, enter the TRANSPOSE formula in excelThe TRANSPOSE function in excel helps rotate (switch) the values from rows to columns and vice versa. Being a part of the Excel lookup and reference functions, its purpose is to organize the data in the desired format. To execute the formula, the exact size of the range to be transposed is selected and the CSE key (“Control+Shift+Enter”) is pressed.
    read more
    ‘=TRANSPOSE($A$1:$F$3)’.

TRANSPOSE Formula Example 2-2

  • Since this formula needs to be applied for other blank cells so press ‘Ctrl+Shift+Enter.’

TRANSPOSE Formula Example 2-3

The rows are converted to columns.

TRANSPOSE Formula Example 2-4

Advantages

  1. The Paste Special method is useful when the user needs the original formatting to be continued.
  2. In the transpose method, by using the TRANSPOSE function, the converted table will change its data automatically, which means that whenever the user changes the data in the original table, it will automatically change the data in the transposed table, as it is linked to it.
  3. Converting the rows to columns in Excel sometimes helps the user to make the audience understand their data easily and so that the audience interprets it without much effort.

Disadvantages

  1. If the number of rows and columns increases, then the transpose method using the Paste Special options cannot perform efficiently. In this case, the “TRANSPOSE” function will be disabled when there are many rows to be converted to columns.
  2.  The “Transpose Paste Special” option does not link the original data to the transposed data. Therefore, if you need to change the data, you must repeat all the steps.
  3. In the transpose method, the source formatting is not kept the same for the transposed data by using the formula.
  4. After converting the rows to columns in Excel using a formula, the user cannot edit the data in the transposed table as it is linked to the source data.

Things to Remember

  1. We can transpose rows to columns using Paste Special methods. We can link the data to the original data by selecting “Paste Link” from the “Paste Special” dialog box.
  2. We can also use Excel’s INDIRECT formula and ADDRESS functions in ExcelThe address function finds the cell’s address and returns an absolute value. It requires two mandatory arguments: the row number and the column number. For example, if we use =Address(1,2), the result will be $B$1.read more to convert rows to columns and vice-versa.

Recommended Articles

This article is a guide to Convert Rows to Columns in Excel. Here, we discuss switching rows to columns in Excel using the Paste Special and TRANSPOSE formula, practical examples, and a downloadable Excel template. You may learn more about Excel from the following articles: –

  • Group Columns in ExcelIn Excel, grouping one or more columns together in a worksheet is referred to as group column and I t allows you to contract or expand the column.read more
  • Compare Two Columns in ExcelTwo columns in excel are compared when their entries are studied for similarities and differences.read more
  • Use Columns Formula in Excel
  • Column Sort in Excel

Do you have some values arranged as rows in your workbook, and do you want to convert text in rows to columns in Excel like this?

1 rows to columns in excel

In Excel, you can do this manually or automatically in multiple ways depending on your purpose. Read on to get all the details and choose the best solution for yourself. 

How to convert rows into columns or columns to rows in Excel – the basic solution

The easiest way to convert rows to columns in Excel is via the Paste Transpose option. Here is how it looks:

  • Select and copy the needed range
  • Right-click on a cell where you want to convert rows to columns
  • Select the Paste Transpose option to rotate rows to columns

2 paste transpose

As an alternative, you can use the Paste Special option and mark Transpose using its menu. 

3 paste special

It works the same if you need to convert columns to rows in Excel.

columns to rows in excel

This is the best way for a one-time conversion of small to medium numbers of rows both in the Excel desktop and online. 

Can I convert multiple rows to columns in Excel from another workbook?

The method above will work well if you want to convert rows to columns in Excel between different workbooks using Excel desktop. You need to have both spreadsheets open and do the copying and pasting as described. 

However, in Excel Online, this won’t work for different workbooks. The Paste Transpose option is not available. 

4 convert rows to columns different workbooks online

Therefore, in this case, it’s better to use the TRANSPOSE function.

How to switch rows and columns in Excel in more efficient ways

To switch rows and columns in Excel automatically or dynamically, you can use one of these options:

  • Excel TRANSPOSE function
  • VBA macro
  • Power Query 

Let’s check out each of them in the example of a data range that we imported to Excel from a Google Sheets file using Coupler.io. 

dataset

Coupler.io is an integration solution that synchronizes data between source and destination apps on a regular schedule. For example, you can set up an automatic data export from Google Sheets every day to your Excel workbook. 

Check out all the available Excel integrations.

coupler

How to change row to column in Excel with TRANSPOSE

TRANSPOSE is the Excel function that allows you to switch rows and columns in Excel. Here is its syntax:

=TRANSPOSE(array)
  • array – an array of columns or rows to transpose

One of the main benefits of TRANSPOSE is that it links the converted columns/rows with the source rows/columns. So, if the values in the rows change, the same changes will be made in the converted columns. 

TRANSPOSE formula to convert multiple rows to columns in Excel desktop

TRANSPOSE is an array formula, which means that you’ll need to select a number of cells in the columns that correspond to the number of cells in the rows to be converted and press Ctrl+Shift+Enter.

=TRANSPOSE(A1:J2)

5 transpose formula excel desktop

Fortunately, you don’t have to go through this procedure in Excel Online.

TRANSPOSE formula to rotate row to column in Excel Online

You can simply insert your TRANSPOSE formula in a cell and hit enter. The rows will be rotated to columns right away without any additional button combinations.

6 transpose formula excel online

Excel TRANSPOSE multiple rows in a group to columns between different workbooks

We promised to demonstrate how you can use TRANSPOSE to rotate rows to columns between different workbooks. In Excel Online, you need to do the following:

  • Copy a range of columns to rotate from one spreadsheet and paste it as a link to another spreadsheet.
7 paste as link
  • We need this URL path to use in the TRANSPOSE formula, so copy it.

8 path to the range

  • The URL path above is for a cell, not for an array. So, you’ll need to slightly update it to an array to use in your TRANSPOSE formula. Here is what it should look like:
=TRANSPOSE('https://d.docs.live.net/ec25d9990d879c55/Docs/Convert rows to columns/[dataset.xlsx]dataset'!A1:D12)

9 transpose different spreadsheets

You can follow the same logic for rotating rows to columns between workbooks in Excel desktop.

Are there other formulas to convert columns to rows in Excel?

TRANSPOSE is not the only function you can use to change rows to columns in Excel. A combination of INDIRECT and ADDRESS functions can be considered as an alternative, but the flow to convert rows to columns in Excel using this formula is much trickier. Let’s check it out in the following example.

How to convert text in columns to rows in Excel using INDIRECT+ADDRESS

If you have a set of columns with the first cell A1, the following formula will allow you to convert columns to rows in Excel.

=INDIRECT(ADDRESS(COLUMN(A1),ROW(A1)))

2.1 columns to rows in excel indirect address

But where are the rows, you may ask! Well, first you need to drag this formula down if you are converting multiple columns to rows. Then drag it to the right.

2.2 columns to rows in excel indirect address

NOTE: This Excel formula only to convert data in columns to rows starting with A1 cell. If your columns start from another cell, check out the next section.

How to convert Excel data in columns to rows using INDIRECT+ADDRESS from other cells

To convert columns to rows in Excel with INDIRECT+ADDRESS formulas from not A1 cell only, use the following formula:

=INDIRECT(ADDRESS(COLUMN(first_cell) - COLUMN($first_cell) + ROW($first_cell), ROW(first_cell) - ROW($first_cell) + COLUMN($first_cell)))
  • first_cell – enter the first cell of your columns

Here is an example of how to convert Excel data in columns to rows:

=INDIRECT(ADDRESS(COLUMN(C5) - COLUMN($C$5) + ROW($C$5), ROW(C5) - ROW($C$5) + COLUMN($C$5)))

2.3 columns to rows in excel indirect address

Again, you’ll need to drag the formula down and to the right to populate the rest of the cells.

2.4 columns to rows in excel indirect address

How to automatically convert rows to columns in Excel VBA

VBA is a superb option if you want to customize some function or functionality. However, this option is only code-based. Below we provide a script that allows you to change rows to columns in Excel automatically.

  • Go to the Visual Basic Editor (VBE). Click Alt+F11 or you can go to the Developer tab => Visual Basic. 

10 visual basic editor

  • In VBE, go to Insert => Module.

11 insert module

  • Copy and paste the script into the window. You’ll find the script in the next section.

12 paste script

  • Now you can close the VBE. Go to Developer => Macros and you’ll see your RowsToColumns macro. Click Run.

13 macros rows to columns

  • You’ll be asked to select the array to rotate and the cell to insert the rotated columns.

14 run rows to columns macro

  • There you go!

15 rows converted to columns0vba macro

VBA macro script to convert multiple rows to columns in Excel

Sub TransposeColumnsRows()
    Dim SourceRange As Range
    Dim DestRange As Range
 
    Set SourceRange = Application.InputBox(Prompt:="Please select the range to transpose", Title:="Transpose Rows to Columns", Type:=8)
    Set DestRange = Application.InputBox(Prompt:="Select the upper left cell of the destination range", Title:="Transpose Rows to Columns", Type:=8)
 
    SourceRange.Copy
    DestRange.Select
    Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:=False, Transpose:=True
    Application.CutCopyMode = False
 
End Sub

Sub RowsToColumns()
    Dim SourceRange As Range
    Dim DestRange As Range
 
    Set SourceRange = Application.InputBox(Prompt:="Select the array to rotate", Title:="Convert Rows to Columns", Type:=8)
    Set DestRange = Application.InputBox(Prompt:="Select the cell to insert the rotated columns", Title:="Convert Rows to Columns", Type:=8)
 
    SourceRange.Copy
    DestRange.Select
    Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:=False, Transpose:=True
    Application.CutCopyMode = False
 
End Sub

Read more in our Excel Macros Tutorial.

Convert rows to column in Excel using Power Query

Power Query is another powerful tool available for Excel users. We wrote a separate Power Query Tutorial, so feel free to check it out. 

Meanwhile, you can use Power Query to transpose rows to columns. To do this, go to the Data tab, and create a query from table. 

16 query from table

  • Then select a range of cells to convert rows to columns in Excel. Click OK to open the Power Query Editor. 

17 select rows to convert

  • In the Power Query Editor, go to the Transform tab and click Transpose. The rows will be rotated to columns. 

18 transform transpose

  • If you want to keep the headers for your columns, click the Use First Row as Headers button.

19 use first row headers

  • That’s it. You can Close & Load your dataset – the rows will be converted to columns.

20 close and load

Error message when trying to convert rows to columns in Excel

To wrap up with converting Excel data in columns to rows, let’s review the typical error messages you can face during the flow.

Overlap error

21 overlap error

The overlap error occurs when you’re trying to paste the transposed range into the area of the copied range. Please avoid doing this.

Wrong data type error

22 wrong data type error

You may see this #VALUE! error when you implement the TRANSPOSE formula in Excel desktop without pressing Ctrl+Shift+Enter. 

Other errors may be caused by typos or other misprints in the formulas you use to convert groups of data from rows to columns in Excel. Always double-check the syntax before pressing Enter or Ctrl+Shift+Enter 🙂 . Good luck with your data!

  • Zakhar Yung

    A content manager at Coupler.io whose key responsibility is to ensure that the readers love our content on the blog. With 5 years of experience as a wordsmith in SaaS, I know how to make texts resonate with readers’ queries✍🏼

Back to Blog

Focus on your business

goals while we take care of your data!

Try Coupler.io

Convert Rows to Columns in Excel

Excel Rows to Columns (Table of Contents)

  • Rows to Columns in Excel
  • How to Convert Rows to Columns in Excel using Transpose?

Rows to Columns in Excel

In Microsoft Excel, we can change the rows to column and column to row vice versa, using TRANSPOSE. We can either use the Transpose or Transpose function to get the output.

Definition of Transpose

Transpose function normally returns a transposed range of cells which is used to switch the rows to columns and columns to rows vice versa, i.e. we can convert a vertical range of cells to a horizontal range of cells or a horizontal range of cells to a vertical range of cells in excel.

For example, a horizontal range of cells is returned if a vertical range is entered, or a vertical range of cells is returned if a horizontal range of cells is entered.

How to Convert Rows to Columns in Excel using Transpose?

It is very simple and easy. Let’s understand the working of converting rows to columns in excel by using some examples.

You can download this Convert Rows to Columns Excel?Template here – Convert Rows to Columns Excel?Template

Steps to use transpose:

  • Start the cell by selecting and copying an entire range of data.
  • Click on the new location.
  • Right-click the cell.
  • Choose to paste special, and we will find the transpose button.
  • Click on the 4th option.

Rows to Columns Step 1

  • We will get the result converted to rows to columns.

Example #1

Consider the below example where we have a revenue figure for sales month wise. We can see that month data are row-wise and Part number data are column-wise.

Example 1

If we want to convert the rows to the column in excel, we can use the transpose function and apply it by following the below steps.

  • First, select the entire cells from A To G, which has data information.
  • Copy the entire data by pressing the Ctrl+ C Key.

Rows to Columns Example 1-2

  • Now select the new cells where exactly you need to have the data.
  • Right, click on the new cell, and we will get the below option which is shown below.

Rows to Columns Example 1-3

  • Choose the option paste special.

Rows to Columns Example 1-4

  • Select the fourth option in paste special, which is called transpose, as shown in the below screenshot highlighted in yellow color.

Rows to Columns Example 1-5

  • Once we click on transpose, we will get the below output as follows.

Result of Example 1

In the above screenshot, we can see that rows have been changed to column and column has been changed to rows in excel. In this way, we can easily convert the given data from row to column and column to row in excel. For the end-user, if there is a huge data, this transpose will be very useful, and it saves a lot of time instead of typing it, and we can avoid duplication.

Example #2

In this example, we will convert rows to the column in excel and see how to use transpose the employee salary data by following the below steps.

Example 2

Consider the above screenshot, which has id number, emp name, HRA, Allowance, and Special Allowance. Suppose we need to convert the data column to rows; in these cases TRANSPOSE function will be very useful to convert it, which saves time instead of entering the data. We will see how to convert the column to row with the below steps.

  • Click on the cell and copy the entire range of data as shown below.

Rows to Columns Example 2-2

  • Once you copy the data, choose the new cell location.
  • Right-click on the cell.
  • We will get the paste special dialogue box.
  • Choose Paste Special option.
  • Select the Transpose option in that, as shown below.

Rows to Columns Example 2-3

  • Once you have chosen the transpose option, the excel row data will be converted to the column as shown in the below result.

Result of Example 2

In the above screenshot, we can see the difference that row has been converted to columns; in this way, we can easily use the transpose to convert horizontal to vertical and vertical to horizontal in excel.

Transpose Function

In excel, a built-in function called Transpose Function converts rows to columns and vice versa; this function works the same as transpose. i.e. we can convert rows to columns or columns into rows vice versa.

Syntax of Transpose Function:

Transpose Function

Argument

  • Array: The range of cells to transpose.

When a set of an array is transposed, the first row is used as the first column of an array, and in the same way, the second row is used as the second column of a new one and the third row is used as the third column of the array.

If we are using the transpose function formula as an array, then we have CTRL+SHIFT +ENTER to apply it.

Example #3

In this example, we are going to see how to use the transpose function with an array with the below example.

Consider the below example, which shows sales data week wise where we are going to convert the data to columns to row and row to column vice versa by using the transpose function.

Example 3

  • Click on the new cell.
  • Select the row you want to transpose.
  • Here we are going to convert the MONTH PLAN to the column.
  • We can see that there are 11 rows, so in order to use the transpose function, the rows and columns should be in equal cells; if we have 11 rows, then the transpose function needs the same 11 columns to convert it.
  • Choose exactly 11 columns, use the Transpose Formula, and select an array from C1 to C11, as shown in the below screenshot.

Rows to Columns Example 3-2

  • Now use CTRL+SHIFT +ENTER to apply as an array formula.
  • Once we use the CTRL+SHIFT +ENTER, we can see the open and close parenthesis in the formulation.
  • We will get the output where a row has been changed to the column, which is shown below.

Rows to Columns Example 3-3

  • Use the formula for the entire cells so that we will get the exact result.

Rows to Columns Example 3-4

So the Final Output will be as below.

Result of Example 3

Things to Remember about Convert Rows to Columns in Excel

  • Transpose function is one of the most useful functions in excel where we can rotate the data, and the data information will not be changed while converting.
  • If there are any blank or empty cells, transpose will not work, and it will give the result as zero.
  • While using the array formula in transpose function, we cannot delete or edit the cells because all the data are connected with links, and Excel will throw an error message that “YOU CAN NOT CHANGE PART OF AN ARRAY.”

Recommended Articles

This has been a guide to Rows to Columns in Excel. Here we discuss how to convert rows to columns in excel using transpose along with practical examples and a downloadable excel template. Transpose can help everyone to convert multiple rows to a column in excel easily quickly. You can also go through our other suggested articles –

  1. Excel COLUMNS Function
  2. Excel ROW Function
  3. Unhide Columns in Excel
  4. Excel Rows and Columns

See all How-To Articles

This tutorial demonstrates how to transpose rows to columns in Excel and Google Sheets.

transpose rows columns initial data

Transpose Rows to Columns

In Excel, you can transpose data from rows to columns. This is often used when you copy data from some other application and want to re-organize them to column-oriented. You can transpose rows from a single column, or transpose multiple column rows at once using the Paste special option.

Transpose Rows in One Column

Say you have the following list of names in Column A and want to transpose them to columns in Row 1.

transpose rows columns initial data

  1. Select the range to transpose (A1:A8), right-click the selected area, and choose Copy (or use the keyboard shortcut CTRL + C).

transpose rows columns 1

  1. Right-click the cell where you want to paste transposed data (B1), click the arrow next to Paste Special, and choose the Transpose icon (or use the Transpose shortcut).

transpose rows columns 2

Note: Your paste range can’t intersect with the original, copied range. (That’s why we pasted data in B1, not A1.) After pasting, you can delete the original data in Column A – if not needed – because all values are now in the columns of Row 1.

transpose rows columns 3

Transpose Rows in Multiple Columns

You could also have data in rows across multiple columns and need to transpose them. For example, your header is in the first column, but should be in the first row, and each item should have its own row. In the following data set, sales data are organized this way.

transpose rows columns 4

To transpose all rows to columns, follow these steps.

  1. Select the range to transpose (A1:E4), right-click the selected area, and choose Copy (or use the keyboard shortcut CTRL + C).

transpose rows columns 5

  1. Right-click the cell where you want to paste transposed data (F1), click the arrow next to Paste Special, and choose the Transpose icon (or use the Transpose shortcut).

transpose rows columns 6

  1. Now you can delete the original data if you don’t need it since the range is transposed to rows.

transpose rows columns 7

Transpose Rows to Columns in Google Sheets

Similar to Excel, you can also transpose rows to columns in Google Sheets.

  1. Select the range to transpose (A1:A8), right-click the selected area, and choose Copy (or use the keyboard shortcut CTRL + C).

google sheets transpose rows columns 1

  1. Right-click the cell where you want to paste transposed data (B1), click Paste Special, and choose Transposed.

google sheets transpose rows columns 2

As a result, values from Column A are now transposed in Row 1.

google sheets transpose rows columns 3

Transposing multiple columns works similarly.

Понравилась статья? Поделить с друзьями:
  • How to pronounce the word often
  • How to row height in excel
  • How to round numbers in excel
  • How to pronounce the word learn
  • How to round number in excel