The fastest way to flip rows and columns

To swap rows and columns in Excel, use the Paste Special feature with the Transpose option. Select the cells you want to move, copy them, right-click where you want them to go, choose Paste Special, check the Transpose box, and click OK. This flips your data so that what was in rows becomes columns, and what was in columns becomes rows.

The process takes about 30 seconds and works on any size range — from a small list to thousands of cells. You do not need to manually rearrange anything; Excel handles the entire swap at once.

Key Takeaways

  • Transpose moves data from rows to columns and columns to rows in a single operation using Paste Special.
  • You must copy the original data first, then use Paste Special with Transpose checked to place the flipped version elsewhere.
  • The original data stays in place unless you delete it after the transpose is complete.
  • Transpose works on any rectangular selection, including data with headers, formulas, and formatting.

Step-by-step: Using Paste Special to transpose

Start by selecting all the cells that contain the data you want to flip. Click the first cell, then drag to the last cell, or click the first cell and hold Shift while clicking the last cell. Make sure you include headers if your data has them — they will move along with everything else.

Press Ctrl+C (or Cmd+C on Mac) to copy the selection. The cells will show a moving dotted border around them, which means they are copied and ready to move.

Click the cell where you want the transposed data to start. This is usually a blank area to the right or below your original data, so the two do not overlap. Right-click and select Paste Special from the menu. In the Paste Special dialog box, check the box next to Transpose (usually in the lower left area of the window). Click OK.

Excel will paste your data with rows and columns swapped. The original data remains unchanged. If you want to remove the original, select it and press Delete to clear the cells, or right-click and choose Delete to remove the entire rows or columns.

When to transpose: Common situations

Transpose is useful when data arrives in the wrong orientation for your analysis. For example, if you have monthly sales figures listed across the top in columns but your chart needs them listed down the left side in rows, transpose will flip them into the right shape.

It also helps when you receive data from another source — a report, a database export, or a shared spreadsheet — that is organized the opposite way from what you need. Rather than manually retyping or copying each value, transpose does it all at once.

Another common use is preparing data for a pivot table or a chart that expects a specific layout. Some tools work better when categories are in rows and values are in columns, or vice versa. Transpose lets you reorganize without losing any information.

Transposing with formulas and formatting

When you transpose, Excel copies the values, formulas, and formatting all together. If your original cells contain formulas that reference other cells, those formulas will adjust automatically when they move to their new location — the same way they would if you cut and pasted them normally.

Formatting such as bold text, colors, borders, and number formats also moves with the data. If a cell was formatted as currency in the original data, it will remain currency after the transpose.

If you want to transpose only the values and not the formulas, use Paste Special again after the first transpose. Copy the transposed data, then Paste Special with the Values option checked. This replaces the formulas with their calculated results.

Transposing large datasets

Excel can transpose datasets with thousands of rows and columns, but the process works the same way regardless of size. Select all the data, copy, and use Paste Special with Transpose. The only difference is that it may take a few seconds longer for very large selections.

If your data is extremely large and your computer is running slowly, close other programs first to free up memory. This makes the copy and paste operation faster.

One limitation: if your transposed data will be wider or taller than Excel's grid allows (1,048,576 rows or 16,384 columns), the transpose will fail. This is rare, but if you hit this limit, you will need to split the data into smaller sections and transpose each one separately.

Undoing a transpose if something goes wrong

If the transpose did not work the way you expected, press Ctrl+Z (or Cmd+Z on Mac) when ready to undo it. This restores your data to the state before you pasted. You can undo multiple times to go back several steps if needed.

If you already deleted the original data and want to get it back, undo will recover it as long as you have not closed the file. Once you close and reopen the file, undo is no longer available.

Frequently Asked Questions

Can I transpose data without copying it first?

No. Transpose only works through Paste Special, which requires you to copy first. There is no direct "transpose in place" command that flips data without copying. You must copy, then paste with Transpose checked in a new location.

What happens to my original data after I transpose?

Your original data stays exactly where it is. Transpose creates a copy in the new location with rows and columns swapped. You can then delete the original if you no longer need it, or keep both versions if you want to compare them.

Does transpose work with merged cells?

Transpose will move merged cells, but the merged structure may not transpose the way you expect. It is usually safer to unmerge cells before transposing, then remerge them in the new layout if needed.

Can I transpose data that includes blank cells?

Yes. Blank cells transpose just like any other cells — they remain blank in their new positions. This does not cause any errors or problems with the operation.

Is there a keyboard shortcut for Paste Special with Transpose?

The keyboard shortcut for Paste Special is Ctrl+Shift+V (or Cmd+Shift+V on Mac). This opens the Paste Special dialog, where you can check Transpose and click OK. There is no single-key shortcut for Transpose alone.