Let's say you have a worksheet with thousands of rows of data. It would be extremely difficult to see patterns and trends just from examining the raw information. Similar to charts and sparklines, conditional formatting provides a way to visualize data and make worksheets easier to understand.
Watch the video below to learn more about conditional formatting in Excel.
Understanding conditional formatting
Conditional formatting allows you to automatically apply formatting—such as colors, icons, and data bars—to one or more cells based on the cell value. To do this, you'll need to create a conditional formatting rule. For example, a conditional formatting rule might be: If the value is less than $2000, color the cell red. By applying this rule, you'd be able to quickly see which cells contain values less than $2000.
To create a conditional formatting rule:
In our example, we have a worksheet containing sales data, and we'd like to see which salespeople are meeting their monthly sales goals. The sales goal is $4000 per month, so we'll create a conditional formatting rule for any cells containing a value higher than 4000.
- Select the desired cells for the conditional formatting rule.
- From the Home tab, click the Conditional Formatting command. A drop-down menu will appear.
- Hover the mouse over the desired conditional formatting type, then select the desired rule from the menu that appears. In our example, we want to highlight cells that are greater than $4000.
- A dialog box will appear. Enter the desired value(s) into the blank field. In our example, we'll enter 4000 as our value.
- Select a formatting style from the drop-down menu. In our example, we'll choose Green Fill with Dark Green Text, then click OK.
- The conditional formatting will be applied to the selected cells. In our example, it's easy to see which salespeople reached the $4000 sales goal for each month.
You can apply multiple conditional formatting rules to a cell range or worksheet, allowing you to visualize different trends and patterns in your data.
Conditional formatting presets
Excel has several predefined styles—or presets—you can use to quickly apply conditional formatting to your data. They are grouped into three categories:
- Data Bars: Horizontal bars added to each cell, much like a bar graph.
- Color Scales: Change the color of each cell based on its value. Each color scale uses a two- or three-color gradient. For example, in the Green-Yellow-Red color scale, the highest values are green, the average values are yellow, and the lowest values are red.
- Icon Sets: Add a specific icon to each cell based on its value.
To use preset conditional formatting:
- Select the desired cells for the conditional formatting rule.
- Click the Conditional Formatting command. A drop-down menu will appear.
- Hover the mouse over the desired preset, then choose a preset style from the menu that appears.
- The conditional formatting will be applied to the selected cells.
Removing conditional formatting
To remove conditional formatting:
- Click the Conditional Formatting command. A drop-down menu will appear.
- Hover the mouse over Clear Rules, then choose which rules you want to clear. In our example, we'll select Clear Rules from Entire Sheet to remove all conditional formatting from the worksheet.
- The conditional formatting will be removed.
Challenge!
- Open our practice workbook.
- Click the Challenge worksheet tab in the bottom-left of the workbook.
- Select cells B3:J17.
- Let's say you're the teacher and want to easily see all of the grades that are below passing. Apply Conditional Formatting so it Highlights Cells containing values Less Than 70 with a light red fill.
- Now you want to see how the grades compare to each other. Under the Conditional Formatting tab, select the Icon Set called 3 Symbols (Circled). Hint: The names of the icon sets will appear when you hover over them.
- Your spreadsheet should look like this:
- Using the Manage Rules feature, remove the light red fill, but keep the icon set.
FAQs
Can I apply multiple rules to the same cells?
Yes, you can apply multiple rules. For example, you can highlight values above 90 in green and values below 50 in red. Use Manage Rules to control the order in which they are applied.
How do I find cells that have conditional formatting?
Press F5 (or Ctrl+G), click Special, select Conditional Formats, and click OK. Excel will select all cells on the sheet that have rules applied.
Can I use a formula to determine which cells to format?
Yes. Select "New Rule" and choose "Use a formula to determine which cells to format". This allows you to format cells based on values in other cells (e.g., highlight Row 1 if A1 > 100).
Why is my conditional formatting not working?
Check the "Applies to" range in the Rules Manager. Often, copying and pasting data can fragment the range. Also, ensure there are no conflicting rules or that "Stop If True" isn't checked incorrectly.
How do I copy conditional formatting to other cells?
Use the Format Painter tool. Click a cell with the desired rule, click Format Painter, and then drag over the new cells you want to format.
No comments:
Post a Comment