Format table cells and borders

You can format a table using the Table inspector; many options are also available in the format bar.

Split or merge table cells

Splitting cells divides each selected cell into two equal parts, horizontally (into rows) or vertically (into columns). Both of the new cells have identical background colors or images. Any text that was in the original cell remains in the topmost or leftmost cell.

Merging table cells combines adjacent cells into one or rejoins cells that have been previously split, eliminating the borders so that they behave as a single cell.

Do any of the following:

  • Split selected cells horizontally: Choose Format > Table > Split into Rows.

  • Split selected cells vertically: Choose Format > Table > Split into Columns.

  • Rejoin cells that have previously been split: Select all the cells you want to rejoin, and choose Format > Table > Merge Cells.

When you merge cells, here’s what happens to cell content:

  • Horizontal contiguous cells containing text, numbers, formatted values, or formulas: All content becomes text separated by tabs.

  • Vertical contiguous cells containing text, numbers, formatted values, or formulas: All content becomes text separated by carriage returns.

  • Column cells: The cell background assumes the image or color from the topmost cell.

  • Row cells: The cell background assumes the image or color from the leftmost cell.

  • An empty cell and a non-empty cell: The content of the non-empty cell is retained.

  • An empty cell and a cell containing a number format: The number format is retained.

Resize table rows and columns

Do any of the following:

  • Resize an individual row or column: Drag a row or column border.

  • Make all rows or columns the same size: Select the table and choose Format > Table > Distribute Option Evenly.

  • Make specific rows or columns (adjacent or nonadjacent) the same size: Select one or more cells and choose Format > Table > Distribute Option Evenly.

  • Specify dimensions for row height or column width: In the Table pane of the Table inspector, set values in the Column Width and Row Height fields.

  • Automatically resize table cells to fit their contents: In the Table pane of the Table inspector, select “Automatically resize to fit content.”

Alternate table row colors

Use a different color background for alternate rows to give a table a banded effect.

  1. Select the table.

  2. If the Table inspector isn’t open, open it.

  3. In the Table inspector, click Table and select Alternating Row Color.

  4. Click the adjacent color well to open the Colors window, and select a color for the alternate rows.

  5. To change the color fill attributes of the other rows, use the Cell Background options in the Table inspector.

Apply a cell format to table cells

You can apply a format to a cell to display its value in a particular way. For example, you can apply the currency format to cells that hold monetary values so that a currency symbol (such as $, £, or ¥) appears in front of numbers in the cells.

  1. Select a cell or cells.

  2. If the Table inspector isn’t open, open it.

  3. Click Format in the Table inspector.

  4. Choose a format from the Cell Format pop-up menu.

    To add a value to an empty cell that has a format, select the cell and enter a value. The format is applied when you leave the cell.

    After you define a cell format, you can associate the format with multiple cells using autofill.

    Use these table cell formats

    When you want to

    Automatic

    Automatically format content based on the characters it contains (no special formatting is applied)

    Number

    Format numeric decimal places, thousands separator, or negative values

    Currency

    Format monetary values

    Percentage

    Display numeric values followed by the percent symbol (%)

    Date and Time

    Format date and time values

    Duration

    Format week, day, hour, minute, second, and microsecond values

    Fraction

    Format values smaller than 1

    Numeral System

    Format numbers using the conventions of a particular numeral system (such as decimal or binary)

    Scientific

    Format numbers using an exponent raised by the power of 10

    Text

    Display cell content exactly as you type it

    Custom

    Define your own cell format

To remove cell formatting, choose Automatic from the Cell Format pop-up menu.

Add a color to tables or table cells

You can add a solid color to entire tables or individual table cells. You can also add a color gradient to individual table cells.

  1. Select an entire table or one or more table cells.

  2. If the Table inspector isn’t open, open it.

  3. In the Table pane, do any of the following:

    • Add a solid color to a table or table cells: Choose Color Fill from the Cell Background pop-up menu.

    • Add a color gradient to one or more table cells: Choose Gradient Fill from the Cell Background pop-up menu.

You can still type over a cell background.

Format table cell borders

  1. Select a table cell border.

  2. If the Table inspector isn’t open, open it.

  3. In the Table pane, do any of the following:

    • Change the line style (stroke): Choose a solid line, a dashed line, or None (to make the borders invisible) from the Cell Borders pop-up menu.

    • Change the line color: Click the color well and select a color in the Colors window.

    • Change the line thickness: Specify a number in the field adjacent to the Cell Borders pop-up menu. To enter a value outside the range of 0.25 to 10, type it in the field.