Everyone looks at data differently. Some people create Excel spreadsheets where the main fields go across horizontally in a row. Others put the data vertically. Sometimes these preferences lead to a scenario where you want to transpose Excel data. Transpose is an Excel function that allows you to switch Excel columns to rows without retyping the data. Microsoft must have anticipated this issue because they provide several methods to flip your data. (Includes example Excel spreadsheet.)
The Layout Problem
I recently was given a large Microsoft Excel spreadsheet that contained vendor evaluation information. The information was useful, but because of the way the data was organized, I couldn’t use tools like Auto Filter. I would also have issues if I needed to import the information into a database. A simple example is shown below.
Instead, I want to have the Company names display vertically in Column A and the Data Attributes display horizontally in Row 1. This would make it easier for me to do comparisons and analyses. For example, I can’t easily filter for California vendors.
Transpose Columns & Rows Using Copy & Paste
The steps outlined below were done using Microsoft Office 365.
- Open the spreadsheet you need to change. You may also download the example sheet at the end of this tutorial.
- Click the first cell of your data range such as A1.
- Shift-click the last cell of the range. Your selection should highlight.
- From the Home tab, select Copy or type Ctrl + c.
- Select the new cell where you would like to copy your transposed data.
- Right-click in that cell and select the Transpose icon under Paste.
info As you hover over the Paste options, you can see the data layout change.
You should now see your data with the columns and rows switched. You can resize your columns to suit your needs.
These two data sets are independent. You can delete cells from the top set and it will not impact the transposed set.
Using Transpose Function in a Formula
As I mentioned, Excel has multiple ways for you to switch columns to rows or vice versa. This second way utilizes a formula and array. The end result is the same except your original data and the new transposed data are linked.
- Open your Excel sheet.
- Click an empty cell where you want your converted data. I’m using A7.
- Type =transpose.
- Finish the formula by adding a ( and highlighting the cell range we wish to swap.
- Type ) to close the range.
- Press Enter.
info Notice how Excel provides a tooltip showing for Transpose – “Converts a vertical range of cells to a horizontal range and vice versa“.
Differences in Transpose
While these two methods produce similar results, there are differences. In the first paste method, whatever action I take on a cell is independent of the transposed version. I could delete the original values and nothing would happen to the columns I swapped.
In contrast, the transpose formula version is tethered to the original data. If I change the value in B2 from 1200 to 1500, the new value will automatically update in B8. However, the reverse isn’t true. If I change any transposed cells, the original set will not change. Instead, I will get a #SPILL error and my transposed data will disappear.
attach_file Example Practice Sheet to Swap Columns & Rows
Disclaimer: Images from Amazon Product Advertising API. This site may receive an affiliate commission on these products. Updated: 2020-05-19