Switch rows and columns

If data is entered in columns or rows, but you want to rearrange that data into rows or columns instead, you can quickly transpose the data from one to the other.

For example, the regional sales data that is organized in columns appears in rows after transposing the data, as shown in the following graphics.

Regional data in columns

Regional data in rows

  1. On the worksheet, do the following:
  • To rearrange data from columns to rows, select the cells in the columns that contain the data.
  • To rearrange data from rows to columns, select the cells in the rows that contain the data.
  1. On the Home tab, in the Clipboard group, click Copy Button image.

Excel  Ribbon Image

Keyboard shortcut  To copy the selected data, you can also press CTRL+C.

 Note   You can only use the Copy command to rearrange the data. To complete this procedure successfully, do not use the Cut Button image command.

  1. On the worksheet, select the first cell of the destination rows or columns into which you want to rearrange the copied data.

 Note   Copy areas (copy area: The cells that you copy when you want to paste data into another location. After you copy cells, a moving border appears around them to indicate that they've been copied.) and paste areas (paste area: The target destination for data that's been cut or copied by using the Office Clipboard.) cannot overlap. Make sure that you select a cell in a paste area that falls outside of the area from which you copied the data.

  1. On the Home tab, in the Clipboard group, click the arrow below Paste, and then click Transpose.
  2. After the data is transposed successfully, you can delete the data in the copy area.

Tips

   
  • If the cells that you transpose contain formulas, the formulas are transposed and cell references to data in transposed cells are automatically adjusted. To make sure that formulas continue to refer correctly to data in non-transposed cells, use absolute references in the formulas before you transpose them.

For more information, see Switch between relative, absolute, and mixed references.

  • You can also use a function to transpose rows and columns on the worksheet.

For more information, see TRANSPOSE function.

 
 
Applies to:
Excel 2010