Conditional formatting is used by every Excel user, whether a beginner or an expert. Specifically, conditional formatting allows us to change the layout of certain parts of a worksheet based on specific dynamic conditions, making it easier to present the worksheet to others and improving its readability.
In this article, we’ll explore some of the most common methods for using conditional formatting through concrete examples. Our starting file will contain a list of various sales representatives and their sales figures, values that we want to sort and display differently using conditional formatting.

Excel Conditional Formatting: Cell Highlighting Rules Section
The first section of conditional formatting includes several options to help you best display the values on the worksheet:
- Greater Than / Less Than: We define a threshold, and the formatting highlights all values above or below the defined threshold
- Between: We define a minimum and a maximum. Any value between these two will be highlighted
- Equal To: This option works with both text and numbers, highlighting them if they match the value we enter
- Text that Contains: For text-only cells; if the cell contains the text we enter, it will be highlighted
- A Date Occurring: In this case, we need to be careful because Excel, by default, considers Sunday to be the start of the week. Any value matching “Yesterday,” “Next Week,” etc. (depending on which option we choose) will be highlighted
- Duplicate Values: Select a range; if there are duplicate values, they will be formatted
How to Highlight Numbers Greater Than a Certain Value with Conditional Formatting
Let’s say, for example, that we want to highlight cells with values greater than a certain number (1,000). Click Home > Conditional Formatting > Highlight Cells Rules > Greater Than:

By default, Excel will try to display these values with a light red fill and dark red text, but you can change the format by clicking on Custom Format:

Let’s change the fill color to green:

Let’s also change the font color to white so the values are easier to see:

We’re done! Now we can see the numbers greater than 1,000 highlighted in green with white text, just as we specified.

How to Highlight Cells Using Values from Another Cell via Conditional Formatting
As we can see, the display could be improved since it’s not entirely clear how to associate the names with the individual values. If we want to modify the formatting to include the names as well, we can do so by selecting the range from A2 to A11 and then clicking Home > Conditional Formatting > Highlight Cells Rules > More Rules:

In this case, we need to use a formula to achieve the same result. We’ll often need to do this to replicate conditional formatting functionality on text values, this time it’s simple, since all we need to do is enter =B2>1000. It’s not necessary to include the initial IF because Excel formats the values for which the formula returns true, but we’ll need to remember to enter B2 without the dollar sign to allow Excel to drag the formulas down (which will become B3>1000, B4>1000, and so on).

In the final result, we can see that the text now has the same formatting as the numerical values, ensuring excellent readability.

How to Color Alternating Rows Using Conditional Formatting
You may want to display rows differently by alternating their fill color. The recommendation is not to do this by filling individual rows, because any change would ruin the formatting. With conditional formatting, however, we can achieve an excellent result using formulas.
The starting point is always the same worksheet, but in this case, click Home > Conditional Formatting > New Rule:

The formula we enter is a combination of MOD and ROW:
=MOD(ROW(),2)
The logic behind the formula is to divide ROW (1 for A1, 2 for A2) by two. If this division results in a remainder, then the condition is true, if there is no remainder, then the rule does not apply. The same logic would apply for every 3rd or every 5th row; you’d simply need to change the divisor from 2 to 3 or 5.
Let’s also modify the formatting by adding a yellow fill:

Here is the final result with alternating rows.

How to Format Cells in Excel Based on Text
Let’s use the previous list as an example again. In this case, we want to see which names contain the vowel “O.” Click on Home > Conditional Formatting > Highlight Cells Rules > Text that Contains, enter the value “O,” and set the fill color to green with dark green text:

In the final result, we see that only the cells containing an "O" have been highlighted. In this case, the highlighting is not case-sensitive (both "O" and "o" are valid conditions for highlighting).

How to Highlight Duplicates with Conditional Formatting
In some cases, we may want to highlight duplicates, particularly to avoid errors in subsequent calculations. So let’s add another row of values, where we have Luka Doncic and 650 as the sales value.

By clicking Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values, we already see the duplicate, since row 9 with Wes Unseld also has a value of 650.

As in the previous case, however, we also want to highlight the names differently, not just the numbers. So, click on Home > Conditional Formatting > New Rule:

The formula in this case uses the function COUNTIF:
=COUNTIF($B$2:$B$12,B2)>1
Note that the range is locked, while cell B2 will move downward to adjust based on the corresponding sales value. Let’s also modify the formatting by first setting the fill color to black :

Next, let’s set the font color to white:

The final result will be very helpful in our work, allowing us to distinguish both the name and the number to verify which agents made the same sales.

Excel Conditional Formatting: Top/Bottom Rules Section
In this section, we have the following options:
- Top 10 Items / Bottom 10 Items: We can quickly view, for example, the top 3 or bottom 8 values in a range
- Top 10% / Bottom 10%: See above, but using percentages
- Above Average / Below Average: Highlight values that are lower or higher than the range’s average
Excel Conditional Formatting: Highlight the Top 5 Values
Conditional formatting is also used to display the largest values within a certain range. In this case, we want to highlight the top 5 values in our range, so click Home > Conditional Formatting > Top/Bottom Rules:

By selecting 5 and modifying the formatting (following the same instructions as before, only the color changes), we can easily display the 5 values we’re interested in.

As in other cases, it’s best to also display the names associated with the values to better present our work. So, let’s select the values in Column A and click Home > Conditional Formatting > New Rule:

The formula uses the function LARGE to allow us to display the values from first to fifth:
=B2>=LARGE($B$2:$B$11,5)
The formula instructs Excel to highlight cells only if the corresponding value is at least the fifth largest (the last element of the LARGE function), making it dynamic since B2 is not locked with a dollar sign.
The final result ensures that both parts of the worksheet display the same information.

Excel Conditional Formatting: What Are Data Bars?
Another feature you can use to improve the visualization of a single worksheet is definitely data bars. In this case, it almost looks like you have a chart inside a cell, created by clicking Home > Conditional Formatting > Data Bars and selecting your preferred color:

The formatting isn’t always ideal, but you can still tell at a glance that Billy Cunningham and Oscar Robertson definitely sold more than Charles Barkley or Scottie Pippen.

Let’s try modifying the formatting rule, just click Home > Conditional Formatting > Manage Rules:

For example, let’s say we want to display only the bar without showing the numbers and add a black border. Just check “Show only the bar” and change the border color:

The final result could already be inserted into a slide as a chart and can be useful for making more strategic analyses rather than focusing on individual numbers, as we see in the next image.

Another trick, again, to hide the numbers, is to select the range and enter three semicolons in a row (;;;) as the Custom Format. In this case as well, the values aren’t deleted from the data but simply aren’t displayed.

How to Implement Color Scales in Conditional Formatting
If data bars don’t quite meet our needs, we can also use color scales to achieve the same result. These provide a quick way to visualize values without getting too specific; you can start by clicking Home > Conditional Formatting > Color Scales > More Rules. We recommend switching to “More Rules” because it offers greater flexibility and fewer “bold” colors, which can sometimes be a bit distracting in the layout.

Let’s select the conditions: we want the midpoint to be the 50th percentile and the colors to be lighter than the standard ones.

Let’s modify the font by setting it to white and bold, so we end up with a result similar to the one in the image below.

Of course, in this case as well, we could use the formatting trick with ;;; to hide the values and display only the colors.
Excel Conditional Formatting: Icon Sets
Icon sets are often used because they offer a good compromise between color scales (which can be very intrusive) and data bars, which remain one of the best ways to get a general idea without cluttering the sheet with confusing information. In this case, click Home > Conditional Formatting > Icon Sets> More Rules, where you’ll select the green icon if the value is greater than or equal to 67%, yellow if between 33% and 67%, and red for all others:

As we can see, even in this case, we can easily view the values and distinguish between them. If we don’t want to see the numerical values, we can simply click “Show icon only.” The only thing to keep in mind is that to display the icons correctly (otherwise they’ll appear pixelated), we need to make sure the font size in File > Options > General is at least the same as the current cell’s font size (in this case, 16).

Conclusion
Conditional formatting changes the look of cells based on rules: highlighting values above a threshold, comparing cells, coloring alternate rows, finding text or duplicates, and adding icon sets. Since the rules are dynamic, the formatting updates as soon as the data changes.
