Rearrange rows and columns in Numbers on Mac
You can move rows and columns in a table, and convert rows to columns and columns to rows.
Move rows and columns within a table
You can move any rows and columns in a table; however, they may be reformatted when you move them. For example, when you move header and footer rows to the body of the table, theyre reformatted as body rows, and vice versa.
- Select the rows or columns you want to move.
Do any of the following:
- Move rows: After selecting the rows, click and hold one of the selected row numbers until the rows appear to rise off the table, then drag them above or below another row.
- Move columns: After selecting the columns, click and hold one of the selected column letters until the columns appear to rise off the table, then drag them to the right or left of another column.
Tip: If you drag rows or columns outside of an existing table, you create a new table with them.
Transpose rows and columns
You can transpose the rows and columns in a table to switch themrow 1 becomes column A (the contents of row 1 move into column A and vice versa), row 2 becomes column B, and so on.
Note: If a table provides the source data for a pivot table in your spreadsheet, or if the table is in a spreadsheet thats shared with others, the table cant be transposed.
- Select the table.
- Choose Table > Transpose Rows and Columns (from the Table menu at the top of your screen).
These are the results of transposing:
- Rows and columns resize to the default height and width for the table.
- Header rows become header columns and footer rows become the rightmost columns.
- The table style and custom style changes you made are preserved, including alternating row colors, gridline settings, table and cell outlines, cell and text style, conditional highlights, hidden rows and columns, and so on.
- Chart data references update so charts reference the same data, even after its transposed.
- Merged cells transpose normally, unless theyre in the header row. In a few cases, transposing unmerges merged header row cells.
- Sort and filter rules are discarded, and a linked form is unlinked, if transposing results in a table thats not a valid form.
- Many formulas and functions update automatically when theyre transposed. Warnings indicate any formulas that cant be updated.
To undo the transposing and revert all the changes, select the table and transpose it again.See alsoAdd or remove rows and columns in Numbers on MacResize, move, or lock a table in Numbers on MacResize rows and columns in Numbers on Mac