Add conditional highlighting to cells

You can have Numbers change a cell’s appearance when the value in the cell meets certain conditions. For example, you can make cells turn red if they contain a negative number. To change the appearance of a cell based on its cell value, create a conditional highlighting rule.

Add a conditional highlighting rule

  1. Select one or more cells.

  2. In the Cell pane of the Format inspector, click Conditional Highlighting, then click Add a Rule.

  3. Click a type of rule (for example, if your cell value will be a number, select Numbers), then click a rule. Scroll to see more options.

    Tabs for Number, Text, Dates, Durations, and Blank rule types
  4. Enter values for the rule.

    For example, if you selected the rule “date is after,” enter values to specify what date the date in the cell must come after.

    Click Cell reference button to use a cell reference. A cell reference lets you compare the cell’s value to another cell—so, for example, you can highlight a cell when its value is greater than another cell’s. Click a cell to select it, or enter its table address (for example, F1).

    After you add a cell reference, you can choose whether a cell reference is relative or absolute. Click the arrow on the token and select Preserve Row or Preserve Column. For more information, go to Calculate values using data in table cells.

  5. Choose the cell appearance you want, such as bold or italic, from the pop-up menu.

    You can choose Custom Style to choose your own font color, font weight, and cell fill.

  6. Click Done.

Note: If a cell matches multiple rules, its appearance changes according to the first rule in the list. You can drag to reorder rules.

Repeat a conditional highlighting rule

The easiest way to add a rule to multiple cells is to select those cells, then add the rule. However, if you’ve already added a rule to a cell and you want to apply that rule to other cells, you can combine highlighting rules.

  1. Select the cell with the rule you want to repeat and the cells you want to add the rule to.

  2. In the Cell pane of the Format inspector, click Show Highlighting Rules.

  3. Click Combine Rules.

Delete a conditional highlighting rule

  1. Select the cell or cells with the rule you want to delete.

  2. In the Cell pane of the Format inspector, click Show Highlighting Rules.

  3. Do one of the following:

    • Delete all rules for the selected cells: Click Advanced options button at the bottom of the Format inspector, then click Clear All Rules.

    • Delete a specific rule: Move the pointer over the rule, then click Trash button in the top-right corner.

If you want to delete a rule from all cells but can’t remember which cells to select, select at least one of the cells with that rule. In the Cell pane of the Format inspector, click Show Highlighting Rules. Click Advanced options button at the bottom of the Format inspector, click Select Cells with Matching Rules, then delete the specific rule.