Using Conditional Formatting

Use conditional formatting in Excel to make data easier to read. Use the Excel conditional formatting function to better visualize data too.

Introduction

Lesson 19

Let's say you have a spreadsheet with thousands of rows of data. It would be extremely difficult to see patterns and trends just from examining the raw data. Excel gives us several tools that will make this task easier. One of these tools is called conditional formatting. With conditional formatting, you can apply formatting to one or more cells based on the value of the cell. You can highlight interesting or unusual cell values, and visualize the data using formatting such as colors, icons, and data bars.

In this lesson, you'll learn how to apply, modify, and remove conditional formatting rules.

Conditional formatting

Video: Conditional Formatting in Excel 2010

Launch video!Watch the video (3:17).

Conditional formatting applies one or more rules to any cells you want. An example of a rule might be If the value is greater than 5000, color the cell yellow. By applying this rule to the cells in a worksheet, you'll be able to see at a glance which cells are more than 5000. There are also rules that can mark the top 10 items, all cells that are below the average, cells that are within a certain date range, and many more.

Optional: You can download this example for extra practice.

To create a conditional formatting rule:

  1. Select the cells you want to add formatting to.
  2. In the Home tab, click the Conditional Formatting command. A drop-down menu will appear.
  3. Select Highlight Cells Rules or Top/Bottom Rules. We'll choose Highlight Cells Rules for this example. A menu will appear with several rules.
  4. Select the desired rule (Greater Than, for example).
    Selecting the Greater Than ruleSelecting the Greater Than rule
  5. From the dialog box, enter a value in the space provided, if applicable. In this example, we want to format cells that are greater than $5000, so we'll enter 5000 as our value. If you want, you can enter a cell reference instead of a number.
  6. Select a formatting style from the drop-down menu.
    Entering a value and formatting styleEntering a value and formatting style
  7. The formatting will be applied to the selected cells.
    The formatted cellsThe formatted cells

If you want, you can apply more than one rule to your cells.

Conditional formatting presets

Excel has several presets you can use to quickly apply conditional formatting to your cells. They are grouped into three categories:

To use preset conditional formatting:

  1. Select the cells you want to add formatting to.
  2. In the Home tab, click the Conditional Formatting command. A drop-down menu will appear.
  3. Select Data Bars, Color Scales, or Icon Sets. Then select the desired preset.
    Selecting a formatting presetSelecting a formatting preset
  4. The conditional formatting will be applied to the selected cells.
    The finished Data BarsThe finished Data Bars

To remove conditional formatting rules:

  1. Select the cells that have conditional formatting.
  2. In the Home tab, click the Conditional Formatting command. A drop-down menu will appear.
  3. Select Clear Rules.
  4. A menu will appear. You can choose to clear rules from the Selected Cells, Entire Sheet, This Table, or This PivotTable. In this example, we'll clear rules from the entire sheet.
    Clearing RulesClearing Rules

You can edit or delete individual rules by clicking the Conditional Formatting command and selecting Manage Rules. This is especially useful if you have applied multiple rules to the cells.

Challenge!

  1. Open an existing Excel 2010 workbook. If you want, you can use this example.
  2. Apply conditional formatting to a range of cells with numerical values. If you are using the example, apply formatting to all of the sales data.
  3. Apply a second conditional formatting rule to the same set of cells.
  4. Explore the Conditional Formatting Rules Manager dialog box.
  5. Clear all conditional formatting rules from the worksheet.