How to Change Data from Horizontal to Vertical in Excel
In this article
To change data from horizontal to vertical in Excel, use the Transpose feature. Copy the horizontal row, right-click the destination cell, and choose "Transpose" under Paste Options. This flips the row into a column (and vice versa) in a few seconds. If you need the data to update automatically when the original changes, use the TRANSPOSE function instead. This guide covers both methods, plus common pitfalls and fixes.
What You'll Need
- Microsoft Excel (desktop version for steps below; web version works too but menu names may differ slightly).
- The worksheet containing your horizontal data (a row of values in cells).
- An empty area where the vertical data can go — the transposed data will overwrite anything in the destination cells.
Step-by-Step
Method 1: Copy and Paste Transpose (Static)
- Select the horizontal data. Click the first cell of the row (e.g., A1), hold Shift, and click the last cell of that row (e.g., D1). Or just click and drag across the row.
- Copy the selection. Press Ctrl+C (Windows) or Command+C (Mac). You'll see a moving dashed border around the selected cells.
- Choose the destination cell. Click an empty cell where you want the first value of the vertical column to appear. For example, if your horizontal data is in row 1, click A3 or any cell below the row. Make sure there's enough empty space below and to the right for the transposed data.
- Open Paste Special. Right-click the destination cell. In the context menu, look for "Paste Special…" (sometimes under "Paste Options" submenu). Alternatively, go to the Home tab > Paste > Paste Special.
- Select Transpose. In the Paste Special dialog, check the box labeled Transpose at the bottom right. Click OK. (In some Excel versions, you can also right-click, choose "Paste Options" and click the Transpose icon — a small rectangle with arrows.)
- Done. Your horizontal row is now a vertical column. The original data remains unchanged. This is a static copy — if you edit the original row, the transposed column will not update.
Method 2: TRANSPOSE Function (Dynamic)
If you want the vertical data to update automatically when the horizontal data changes, use the TRANSPOSE function. This is an array formula.
- Select the destination range. Count how many cells are in your horizontal row (e.g., 4 cells from A1 to D1). Then select a vertical range of the same size but in a column — for example, A3:A6 (4 rows in one column). Click the first cell, drag to the last, or use Shift+Click.
- Type the formula. With the range still selected, type
=TRANSPOSE(then select the original horizontal range (e.g., A1:D1). Close the parenthesis:=TRANSPOSE(A1:D1). - Enter as array formula. Press Ctrl+Shift+Enter (Windows) or Command+Shift+Enter (Mac). Excel will wrap the formula in curly braces
{=TRANSPOSE(A1:D1)}automatically. The vertical cells will fill with the values. - Test it. Change a value in the original row (e.g., edit cell B1). The corresponding vertical cell updates instantly.
Method 3: Using Power Query (For Large or Repeated Data)
If you have a large dataset or need to transpose regularly, Power Query is a robust option.
- Select your data (including headers if any). Go to the Data tab and click From Table/Range. If your data isn't already a table, Excel will ask you to create one.
- In Power Query Editor, go to the Transform tab and click Transpose. The rows become columns and vice versa.
- Load the result. Click Close & Load to put the transposed data back into a new worksheet or a new range. The result is dynamic — if the source changes, you can refresh the query (right-click the table > Refresh).
Common Mistakes
- Not selecting the destination cell before pasting. If you paste without selecting a cell, Excel may overwrite the original data or paste in an unexpected location. Always click the target cell first.
- Forgetting to check the Transpose box. If you just paste without using Paste Special, you'll get the same horizontal layout, not vertical.
- Selecting the destination range for TRANSPOSE incorrectly. The range must have the same number of cells as the original, but in the opposite orientation. If you select too many or too few, the formula returns errors or only fills part.
- Overwriting existing data. Transposing pastes into the destination without warning. Ensure the destination area is empty or that you don't mind losing what's there.
- Using TRANSPOSE without array entry. If you just press Enter instead of Ctrl+Shift+Enter, you'll get a #VALUE! error or only the first value.
Tips
- Use the Transpose icon in Paste Options. After copying, right-click and look for the Transpose icon (a rectangle with arrows). It's faster than the full Paste Special dialog.
- Transpose with links. If you want the transposed data to update but also want to keep it as a static copy, use the Paste Special > Paste Link option after transposing? Actually, that doesn't work. Instead, use the TRANSPOSE function as described, or use a formula like
=A1in the first cell and drag down — but that's manual. - For multiple rows at once. If you have several rows you want to flip into columns, select all the rows and transpose — the first row becomes the first column, the second row becomes the second column, etc.
- Keep formatting. The Paste Special Transpose method copies values and formatting (like number formats) but not column widths or conditional formatting rules. If you need exact formatting, consider using Power Query.
- Use the TRANSPOSE function for dynamic dashboards. It's perfect for reports where the source data changes frequently.
Troubleshooting
If the Transpose option is grayed out
Make sure you have actually copied the data (Ctrl+C) before opening Paste Special. The Transpose option is only available after copying. If it's still grayed out, try copying again and then immediately right-clicking the destination.
If the TRANSPOSE function returns #VALUE!
This usually means you didn't press Ctrl+Shift+Enter. Click the cell with the formula, press F2 to edit, then press Ctrl+Shift+Enter again. If you're using Excel 365 or Excel 2021, you might not need the array entry — just press Enter, as dynamic arrays are automatic. But if you're on an older version, you must use Ctrl+Shift+Enter.
If the transposed data is cut off
The destination range might be too small. When using copy-paste transpose, Excel will paste the full range, but if there are hidden rows/columns or if the destination cell is too close to the edge of the sheet, you might see only part. Select a destination cell that has enough empty space to the right and below. For the TRANSPOSE function, you must pre-select the exact size of the output range — if you select too few cells, you'll only get part of the data.
If the data is not updating (for TRANSPOSE)
Check that you used the TRANSPOSE function and not a static paste. Also, if you have automatic calculation turned off (Formulas tab > Calculation Options > Manual), the transposed data won't update until you press F9. Switch to Automatic if you want real-time updates.
If you get a #SPILL! error (Excel 365)
This happens when the output range isn't empty — there's something in the cells where the transposed data wants to go. Clear the destination cells, or move the formula to a new location with empty space.
Frequently Asked Questions
Can I transpose data that has formulas?
Yes. When you copy and paste transpose, the formulas are copied and adjusted to the new orientation. However, if you use the TRANSPOSE function, it will transpose the values, not the formulas — the original formulas are evaluated and their results are placed in the vertical range. If you need the formulas themselves to be transposed, use the copy-paste transpose method.
How do I transpose a table with headers?
Select the entire table including headers, copy, then paste transpose. The headers will become the first column, and the data rows become columns. If you want to keep the headers as headers, you might need to manually adjust after transposing.
Does transposing work on Excel for Mac?
Yes. The steps are essentially the same. Use Command+C to copy and Command+V to paste. The Paste Special dialog is accessed via right-click or the Edit menu. For the TRANSPOSE function, use Command+Shift+Enter for array entry (unless you're on Excel 365 where dynamic arrays are automatic).
Can I transpose data in Google Sheets?
Yes, but this guide is for Excel. In Google Sheets, you can use the TRANSPOSE function similarly, or copy and then right-click > Paste Special > Transpose. The steps are very similar.
Why would I use Power Query instead of copy-paste?
Power Query is better for large datasets that need to be transposed repeatedly or when you want to automate the process. It also preserves data types and can handle more complex transformations. For a one-time small transpose, copy-paste is faster.
How do I transpose from vertical to horizontal?
The same methods work in reverse. Select the vertical column, copy, then paste transpose into a row. The TRANSPOSE function works both ways — just select a horizontal range as the destination.