Add and rearrange table rows and columns
There are three types of rows and columns:
Header rows and columns display labels identifying what each row and column contains. Data in header cells isn’t used in formulas. Headers are optional; you can have up to five header rows and five header columns.
Body rows and columns contain table data. A table must contain at least one body row and one column.
Footer rows appear at the bottom of a table.
For large spreadsheets, you can freeze (or lock) header rows and columns so that they are always visible when you scroll the spreadsheet.
Insert and delete body rows and columns
-
Do one of the following:
Add or delete a row or column at the edge of the table: Click at the bottom or at the top of the table. (Drag the control to add or delete more than one row or column.) You can delete a row or column only if all of its cells are empty.
-
Insert or delete a row or column within the table: Click the table, move the pointer over a numbered or a lettered bar, click the arrow, then choose a command from the menu that appears.
Tip: To insert multiple rows or columns, Command-click the number of rows or columns you want to insert, click the arrow, then choose an Add Columns or Add Rows option.
To delete multiple rows or columns, Command-click the rows or columns, click the arrow, then choose Delete Selected Rows or Delete Selected columns.
Add, delete, and freeze header rows and columns
Adding header rows, header columns, or footer rows converts existing rows or columns into headers or footers. For example, if you have data in the first row of a table and you add a header row, the first row is converted to a header using the same data.
You can freeze header rows or columns so they’re always visible as you scroll the spreadsheet.
Click anywhere in the table.
-
Do any of the following:
Add or delete headers and footers: In the Table pane of the Format inspector, choose a number from the Headers & Footer pop-up menus. To remove all headers or footers, set the number to zero.
-
Freeze header rows or columns: Choose Freeze Header Rows or Freeze Header Columns from the pop-up menu. To unfreeze, deselect Freeze Header Rows or Freeze Header Columns so that the checkmark disappears.
To show table headers on every page of a spreadsheet when you print, see Print a spreadsheet.
Select rows and columns
Click the table.
-
Do any of the following:
Select a single row or column: Click the bar for the row or column you want to select.
Select multiple rows or columns: Click the bar for a row or column, then drag a selection handle (a white dot) to encompass the rows or columns you want.
Select discontiguous rows or columns: Command-click the row or column bar.
Move rows and columns within a table
Select one or more rows or columns, then do any of the following:
Move rows: Click and hold the numbered bars for the rows so the rows appear to lift off the table, then drag above or below another row.
Move columns: Click and hold the lettered bars for the columns so the columns appear to lift off the table, then drag to the right or left of another column.
If you drag rows or columns outside of an existing table, you create a new table with them.
Resize rows and columns
You can change the width of specific columns and the height of specific rows in a table.
Click the table.
-
Do any of the following:
-
Manually resize: Move the pointer over the right edge of the lettered bar for the column you want to resize, or over the bottom of the numbered bar for the row, until you see , then drag to resize.
To resize multiple columns or rows at a time, select them first. Move your pointer over the edge of the rightmost lettered bar or the bottommost numbered bar, then drag when you see . They are resized proportionally to each other. To resize them to be the same size, Option-drag.
-
Resize precisely: Click a cell in the row or column you want to change. In the Table pane of the Format inspector, click the disclosure triangle next to Row & Column Size, then use the arrows to specify the size you want. The entire row or column is resized. Selecting cells from more than one row or column resizes all of the rows or columns included in the selection.
Automatically shrink a column or row to fit its contents: Double-click the right edge of a lettered bar or the bottom edge of a numbered bar. Or in the Table pane of the Format inspector, click the disclosure triangle next to Row & Column Size, then click Fit.
Make all columns the same width or all rows the same height: Select the table, then choose Table > Distribute Rows Evenly or Table > Distribute Columns Evenly (from the Table menu at the top of your computer screen).
Make several columns the same width or several rows the same height: Select a column or row, then Command-click the other columns or rows. Choose Table > Distribute Rows Evenly or Table > Distribute Columns Evenly (from the Table menu at the top of your computer screen).
-
Show and hide rows and columns
Hiding rows or columns is useful if, for example, you need to use their data for formulas, but you don’t want the data to be visible.
When you sort columns, the hidden cells are also sorted.
Select the rows or columns you want to hide.
Move the pointer over a numbered or lettered bar, then click the down arrow that appears.
In the menu that appears, choose Hide Selected Rows or Hide Selected Columns.
To show hidden rows or columns, select a row or column adjacent to the hidden ones. Move the pointer over the bar, click the down arrow, then choose an Unhide option.
To unhide all rows or columns, click anywhere in the table, then choose Table > Unhide All Rows or Unhide All Columns (from the Table menu at the top of your computer screen).