30 Advanced Excel Tips for 2026

Excel Champs / Excel Basics / Conditional Formatting
By Puneet Gogia (Microsoft MVP)

The Complete Guide to Conditional Formatting in Excel

30+ Advanced Excel Tips for 2026

No spam. Only Excel Stuff. God Promise. 😊

This tutorial gives a complete view of how to use conditional formatting and what options are available. It also gives you a list of examples you can learn to use in the real world while working with data.

What is Conditional Formatting?

Conditional Formatting is an option to apply to a cell or a range with a condition. When you use it, it tests a condition first, and only if that condition is TRUE will it apply the formatting. For example, you may want to use red for all the cells in a range with an error or for all the blank cells.

You can use conditional formatting in two ways:

  • Pre-Defined Rules
  • Custom Rule with a Formula

In this tutorial, we will learn about both.

Simple Example to Understand Conditional Formatting

Let’s take an example to understand conditional formatting. In the example below, you have names, and you must highlight the cells with “Aryan” in the name.

1-understand-conditional-formatting
  1. For this, go to Home > Conditional Formatting > Highlight Cells Rules > Text that Contains.
    2-text-that-contains-conditional-formatting
  2. Once you click on the options, it will show you a dialog box where you can enter the text “Aryan” and then define the color you want to apply to the matching cell.
    3-show-you-a-dialog-box-conditional-formatting
  3. It will instantly highlight the cells where the text “Aryan” is there. And after that, click OK.
    4-instantly-highlight-the-cell-conditional-formatting

Let’s understand this: Here, we have a condition test for the cells with the text “Aryan” in it. And only the cells where you have this text are highlighted.

Note: Conditional Formatting is one of the most useful tools to help you quickly analyze data in real-time in Excel.

Available Pre-Defined Conditional Formatting Rules

Five major options have pre-defined rules for you to use in conditional formatting. With pre-defined options, there comes the pre-defined formatting to apply.

5-pre-defined-rules-conditional-formatting

1. Highlight Cells Rules

With the Highlight Cells Rules, you can apply conditional formatting to the cells by checking their values. If you want to highlight a cell where a number is less than 1500, you can use the Less Than option from the list.

6-cell-where-a-number-is-less-than-conditional-formatting

Here you have options to deal with all kinds of data, like text, dates, and numbers.

2. Top/Bottom Rules

With the Top and Bottom options, you can analyze your data quickly. There are options to highlight the top 10 or bottom 10 values (or the top and bottom 10%) and values below or above the average.

7-top-and-bottom-conditional-formatting

Even further, you can customize these options per your needs; let’s say, if you want to highlight the top 20 values instead of the 10, you can do that.

3. Data Bars

Data bars are tiny in-cell charts that show a bar based on the value in each selected cell. Excel looks at the highest and lowest values and sizes the data bars in all the selected cells based on them.

8-data-bars-conditional-formatting

Tip: When you change the column’s width, the data bar adjusts its width according to that.

4. Color Scales

Color Scales help you highlight the cells based on your values in the range. There are two-color and three-color scales that you can use, and Excel has 12 pre-defined color scales in the list.

9-color-scales-conditional-formatting

These color scales help you quickly identify data in no time.

5. Icon Sets

With Icon sets, you can apply the icon to a cell based on its values compared to those in the range. For example, if a value is higher in the range, it will get an upwards arrow; if it’s lower, it will be a downward arrow.

10-icon-sets-conditional-formatting

And as you can see, you have several icon sets to use.

Note: These pre-defined rules will be useful in over 80% of situations. And if you want to go further, you can create a custom rule.

Create a Custom New Rule

And you can also create custom rules if you want. When you click on Home ➜ Conditional Formatting ➜ “New Rule”, it opens a dialog box where you can choose to create a custom rule to apply conditional formatting.

11-create-a-custom-rule-to-apply-conditional-formatting

In this dialog box, you can select any of the options we discussed above and customize them. And in this dialog box, you have one more option which allows you to apply a rule with a custom formula. You can learn more from these detailed tutorials to use conditional formatting in a specific way:

Use a Formula in Conditional Formatting

The formula option gives you full control. Select the range (like A2:D20), go to Home ➜ Conditional Formatting ➜ New Rule ➜ Use a formula to determine which cells to format, enter a formula that returns TRUE or FALSE for the first row of the range, and pick the format. The following formula highlights the entire row when the value in column C is more than 1500:

=$C2>1500

The $ before C locks the column, so every cell in the row checks column C, while the row number changes for each row. And the same way, this formula highlights the rows where the name in column A contains “Aryan”:

=ISNUMBER(SEARCH("Aryan",$A2))

Clear Rule

Conditional formatting is formatting, and you can remove it from a cell or a range of cells without removing the values. Go to Home ➜ Conditional Formatting ➜ Clear Rules, and choose Clear Rules from Selected Cells or Clear Rules from Entire Sheet.

12-remove-conditional-formatting

Or you can also use the keyboard shortcut Alt > E > A > F to clear all the formatting from the selected cell or range. But note that this shortcut also removes the normal formatting (fonts, fills, borders and number formats), not just the conditional formatting.

Managing Rules

This option (Home ➜ Conditional Formatting ➜ Manage Rules) helps you manage all the conditional formatting rules in a worksheet or selection. With the Rules Manager, you can:

  1. Edit or Delete a Rule.
  2. Create a Duplicate or a New Rule.
  3. Change the Applies to Range.
  4. And also change the order of the rules.

Stop IF True

When you tick the Stop If True option for a rule, Excel stops applying the rules below it to a cell when that rule’s condition is true for the cell.

Using Cell Formatting in Conditional Formatting

Conditional formatting allows you to apply formatting to a cell using the Format Cells options. You get most of the formatting options that you have there.

13-cell-using-the-format-cells-options-conditional-formatting
  • Number formatting
  • Font Formatting
  • Border
  • Cell Formatting

Cell formatting here means the Fill tab (background color and pattern). Just note that you can’t change the font name or the font size with conditional formatting; those options are greyed out.

Identify All the Cells where Conditional Formatting is Applied

First, open the Go To Special option from Home > Find & Select > Go To Special.

14-cells-where-conditional-formatting-is-applied

In the Go To Special dialog box, select Conditional formats, and then click OK.

15-select-the-conditional-formatting

And the moment you click OK, it selects the cells where the conditional formatting is applied.

16-cells-where-the-conditional-formatting-is-applied

A Few Points to Consider Before Using Conditional Formatting

  1. Excessive conditional formatting in a workbook can make it a heavy and slow Excel file.
  2. While using formulas with conditional formatting, you must take care of the cell reference.
  3. If you share an Excel workbook with someone else, the conditional formatting stays intact.

Frequently Asked Questions

Does conditional formatting change the values?

No. It only changes how the cells look. The values stay the same, and when the values change, Excel checks the rules again and updates the formatting.

What happens when two rules apply to the same cell?

Both are applied, but when they conflict (like two different fill colors), the rule higher in the Manage Rules list wins. Use the arrows in Manage Rules to change the order.

Why is my formula rule highlighting the wrong cells?

The formula must be written for the first cell of the selected range, with $ signs where needed. If you select A2:D20 but write the formula for row 1, every row checks the row above it.

Puneet Gogia

Written by

Puneet Gogia

Microsoft MVP — Excel · Founder, Excel Champs

Twelve years of teaching Excel, and a decade before that using it as a data analyst. Every tutorial here is written from a file I actually built.

3M+ readers helped
1,000+ tutorials written
Since 2015 teaching Excel