Conditional formatting in Excel is a feature that automatically changes the appearance of cells based on rules you define. Instead of manually scanning rows and columns to find the data that matters, you set conditions and let Excel do the visual work for you. The feature lives on the Home tab under the Conditional Formatting dropdown button.
Excel offers several built-in rule types you can apply with just a few clicks:
| Rule Type | What It Does | Best Used For |
|---|---|---|
| Highlight Cells Rules | Formats cells that meet a specific condition (greater than, less than, equal to, containing text, duplicate values) | Flagging outliers, spotting duplicates, identifying specific text |
| Top/Bottom Rules | Highlights the highest or lowest values, or values above/below average | Ranking performance, finding extremes in a dataset |
| Data Bars | Adds horizontal bars inside each cell proportional to the cell's value | Visualizing magnitude and comparing values at a glance |
| Color Scales | Applies a gradient of two or three colors across a range to show relative values | Showing distribution and spotting trends across large datasets |
| Icon Sets | Displays small icons (arrows, flags, stars) based on thresholds you define | Categorizing data into groups like good/average/poor |
Beyond these built-in options, you can also create custom formula-based rules that give you precise control over which cells get formatted and how. The three examples below focus on some of the most powerful techniques: icon sets, formula-based row highlighting and date calculations.
To follow along using our example, download FPS_Apply Conditional Formatting.xlsx
Conditional formatting rules are useful any time you need to make patterns, exceptions or categories visible without manually formatting individual cells. Here are some of the most common use cases:
The three examples that follow walk you through icon sets for visual categorization, a formula-based rule for highlighting an entire row and a date calculation that flags records meeting an age threshold.
When you want a little more visual interest than cell fill colors and font colors, you can use conditional formatting to display icon sets.
You can display icons based on percentages and custom formulas by changing the Value and Type criteria.
When you are looking at data that has many columns, highlighting just one cell might not be enough for you to see the whole picture. Instead, highlight the whole row!
How to do it:
1) Select the entire data range (excluding column headings).
2) Open the New Formatting Rule dialog box by clicking the Conditional Formatting dropdown button and selecting New Rule.
3) Select Use a formula to determine which cells to format.
4) Enter the formula that describes your conditions. In this example, we want to highlight all rows of customers from Illinois so our formula will be: =$D2="Illinois"
D2 is the first cell in our data that has the text we are looking for. Because the conditional logic works like copy/paste in Excel as it is applied to each cell in the range, you need to put the $ symbol in front of the column letter to lock the column reference so it doesn't shift as the rule evaluates each cell. Do not put it in front of the row number as you want the formula to evaluate each new row.
5) Hit OK to close the dialog box and apply the formatting.
Click Manage Rules to view and edit the conditional formatting formulas if needed. Notice that the Applies to field includes the range that we selected at the beginning.
A frequent task for any business that manages personal information is to calculate ages from birthdates. Using the technique above to highlight an entire row, we can use the following formula in the Format values where the formula is true field to help us see which members on the list are 65 or older:
=INT(YEARFRAC($G2,TODAY()))>65
YEARFRAC calculates the number of years between the birthdate and today's date, and INT rounds the result down to a whole number so the comparison checks for age 65 or older.
Learn more about date functions here.
Once you start building multiple conditional formatting rules, knowing how to manage them becomes essential. Here are some practical tips for staying in control:
Even experienced Excel users run into issues with conditional formatting. Watch out for these common pitfalls:
Mastering Excel conditional formatting is one of the fastest ways to make your spreadsheets clearer and more actionable, but it is just one of many powerful features Excel has to offer. Pryor Learning offers live and on-demand Excel training that covers conditional formatting, formulas, pivot tables, data visualization and more. Whether you are just getting started or looking to sharpen advanced skills, structured training helps you work faster and with greater confidence.