How to use the TRANSPOSE Google Sheets formula

In Google Sheets, if you ever need to flip the columns and rows of an array or a data range, TRANSPOSE Google Sheets function is the one to go with. It swaps — or transposes — the rows and columns, changing the orientation of your spreadsheet data from horizontal to vertical or vice versa.

This can be useful for presentation purposes or to make your table easier to read, for example if your dataset has grown to a large size and the number of columns means it’s very wide, or very long. TRANSPOSE is a handy alternative to copy-pasting, allowing you to switch rows and columns in Google Sheets instantly without errors.

This guide shows how to turn rows into columns, or columns into rows, with the TRANSPOSE function. It also covers how to paste data transposed with Paste special, and how to combine TRANSPOSE with UNIQUE and SPLIT.

TRANSPOSE syntax

TRANSPOSE(array_or_range)

array_or_range – the array or the reference to the range of columns and rows you want to swap or transpose.

 

How to use TRANSPOSE Google Sheets function

This is one of the simplest formulas in Google Sheets. Take a look at the following examples:

TRANSPOSE Google Sheets — sample data with EMP ID #, Salesperson and Sales in A1 to C7

My sample data fills cells A1 to C7. At present, my list of Employee ID numbers (Emp ID#) runs vertically along the left hand side of spreadsheet, in a column. Instead, I want to see my Employee ID list horizontally, along the top of my spreadsheet.

To do this, I enter a TRANSPOSE formula into cell D1: 

TRANSPOSE Google Sheets — =TRANSPOSE(A1:C7) in D1 turns the three columns into rows

You can see that my original data range has been inverted. The rows and columns from the input array_or_range have been swapped and the new (flipped) dataset starts in cell D1. 

Remember to leave enough space in your spreadsheet for the new table of data. Otherwise, the formula returns #REF! error:

TRANSPOSE Google Sheets — #REF! error in D1 because the result would overwrite a value in D2

Another option is to enter an array instead. Here’s an example:

TRANSPOSE Google Sheets — array of four names and numbers transposed into rows 1 and 2

When entering the array, use semi-colons to separate each individual row value in the input range. For individual column values, use commas. As before, you need to ensure that there is enough empty space in your spreadsheet for the new, transposed table of data.

How to replace the old table

If you want to delete the original table of data and replace it with the transposed data

  1. Copy the new table (the data you have transposed).
  2. Go to Edit > Paste special > Values only.
  3. Paste directly over the original table.

Transpose and keep formatting

You might notice that your formatting is lost when you transpose the data in Google Sheets. In this case, use the copy-paste method:

  1. Select the cells you want to transpose.
  2. Copy the cells.
  3. Click inside the cell where you want the new table of inverted data to start.
  4. Go to Edit > Paste special > Transposed. The steps with screenshots are in the paste special section below.

How to paste transposed data in Google Sheets

The TRANSPOSE formula keeps the flipped table linked to the original, so it updates whenever the source data changes. When you only need a one-off copy, paste the data transposed instead. The pasted table is static: it keeps the original formatting, and you can edit or sort it like any other range.

Use paste special to transpose

Follow the instructions below to transpose your data when pasting into a new cell.

  1. 1. Select the range of cells you want to transpose.
Paste transpose in Google Sheets — vendor price table selected from A1 to N9
  1. 2. To copy the cells, you can go to Edit > Copy, right-click on your selection, and choose copy, or use the shortcut: Ctrl + c (Windows) or Cmd + c (Mac).
Paste transpose in Google Sheets — right-click menu with Copy on the selected range

3. Select the cell where you want the transposed data. Go to Edit > Paste special > Transposed, or right-click the cell and choose Paste special > Transposed.

Paste transpose in Google Sheets — right-click Paste special menu with the Transposed option

4. That’s it. The rows and columns in the table have been transposed.

Google Sheets swap rows and columns — pasted table from A11 with months down column A and vendors across the top

Use a keyboard shortcut to paste transposed data

There is no specific keyboard shortcut for pasting transposed data. However, if you have enabled compatible shortcuts, you can use a shortcut to select this option quickly. After copying the cells you want, click on an empty cell and use the following shortcut to transpose and paste: Alt + e, s, e (Windows) or Ctrl + Option + e, s, e (Mac).

Use TRANSPOSE with other functions

While the function is very useful on its own, you can manipulate your data with other functions before using it. By nesting functions, you can transpose the results of your formulas. Below, you have examples of how to combine TRANSPOSE with two other functions: UNIQUE and SPLIT.

UNIQUE & TRANSPOSE

Imagine you have a table with sales for different teams. You want to create a table with summary data for each team, with the team name as the column header. By using TRANSPOSE and UNIQUE on the sales team column, you can get the unique team names in a row.

1. Select the cell where you want the data, ensuring there are enough empty cells below and to the right.

Transpose Google Sheets with UNIQUE — sales table with a sales_team column and cell G1 selected

2. Type the TRANSPOSE function, then the UNIQUE function, and select the range of cells you want. In this case, select the data in the ‘sales_team’ column.

Transpose Google Sheets with UNIQUE — =TRANSPOSE(UNIQUE(D2:D585 typed in cell G1

3. Close both parentheses and press ‘Enter’ to see the result.

Transpose Google Sheets with UNIQUE — Southteam, Northteam, Eastteam and Westteam returned across G1 to J1

SPLIT & TRANSPOSE

Imagine you have a cell containing a list of items separated by semicolons. Follow the steps below to split these items into separate rows instead of columns.

1. Type the TRANSPOSE function in an empty cell, followed by the SPLIT function.

Transpose Google Sheets with SPLIT — =TRANSPOSE(SPLIT( typed in A3 below a semicolon-separated list in A1

2. Select the cell or cells containing the data you want to split and transpose. After a comma, type the delimiter between quotation marks.

Transpose Google Sheets with SPLIT — SPLIT formula with A1 and a semicolon delimiter typed in A3

3. Close both parentheses and press ‘Enter’ to see the result.

Transpose Google Sheets with SPLIT — Item 1 to Item 9 listed down column A from A3

Work more efficiently in Google Sheets

That’s how to quickly switch your data from vertical to horizontal, or rows to columns. Looking for more time-saving tips and tricks in Google Sheets? Learn how to filter Google Sheets without affecting other users or discover how to connect Google Sheets automatically.

You may also like…

google sheets features and formulas

How to find nominal interest rate using Google Sheets

Sarah is a young professional making significant financial decisions. From credit cards to mortgages, student loans, and investment...
google sheets features and formulas

Pull Google Calendar data into Google Sheets using Apps Script

This post was originally published in our community forum. Objective : This guide demonstrates how to use Google Apps Script to pull data...
google sheets features and formulas

Using the PROPER function to capitalize the first letter of each word in Google Sheets

Note: This post was originally published in our community forum. Ever found yourself needing to clean up a list of names, titles, or any...