Open In App

Conditional Formatting in Excel

Last Updated : 13 Aug, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

We use conditional formatting in Excel to highlight important data based on specific rules. This feature applies colors or styles to cells, helping us spot trends or key values in our spreadsheets effortlessly.

We can enhance our data presentation with these practical methods. Let’s explore how to apply them step by step.

1. Preparing the Dataset

We start by entering our data into an Excel spreadsheet, such as an Employee dataset with columns for Salary, Performance Score, and Department.

image
Prepare the Data Set

1.1 Highlight Cells Based on Values

The Highlight Cell Rules feature allows you to format cells based on conditions like greater than, less than, between, or containing specific text. Follow the below steps to highlight cell rules in excel:

Step 1: Select the Column

Select the Column in which you want to apply conditional formatting. Here we have selected Column C(Salary).

Step 2: Choose Conditional Formatting

Go to Home Tab, Click on Conditional Formatting, Select Highlight Cells Rules and Click on Greater Than.

Alternatively Press the Shortcut to open the Conditional Formatting Menu:

  • Alt + H + L
image
Go to Home Tab>> Click on Conditional Formatting >>Select " Highlight Cell Rules">> Click on Greater Than


Step 3: Enter the Value and Press OK

Enter the value you want to highlight, choose a formatting style, and click OK.

Choose-Greater-than
Enter the Value and Press OK

Step 4: Preview Results

Press Enter and Preview Results. Cells with salaries greater than $60,000 will be highlighted in red.

image-
Preview Results

2. Clearing Rules

We can remove formatting when it’s no longer needed.

Step 1: Click on Clear Rules

Go to Home > Conditional Formatting > Clear Rules and Select Choose Clear Rules from Selected Cells (or Entire Sheet).

image-


Step 2: Preview Results

The conditional formatting will be removed from the selected range.

Clear-Conditional-formatting
Preview Results

3. Top/Bottom Rules - Identifying Outliers

We highlight top or bottom values to spot outliers. We will highlight the Top 3 Performers for demonstration.

Step 1: Select the Cells

Select the Performance Score column (Column D) D2:D9.

Select-the-column4
Select the Cells

Step 2: Select the Formatting Rule

Click Home > Conditional Formatting > Top/Bottom Rules > Top 3.

Click-on-Top-3-Values
Select the Formatting Rule

Step 3: Preview Results

This will highlight the top 3 employees with the highest performance scores.

image-
Preview Results

4. Conditional Formatting with Formulas

Using formulas in Conditional Formatting allows you to create custom rules beyond the built-in options. We will Highlight Employees in the Sales Department for demonstration.

Step 1: Select the Dataset

Select the Data Range (A1:E9).

Select-the-Data
Select the Data

Step 2: Select the New Rule

  • Go to Home > Conditional Formatting > New Rule.
  • Select Use a formula to determine which cells to format.
  • Enter the formula

=$B2="Sales"

  • Click Format, choose a fill color (e.g., Green), and click OK.
Select-the-Color1
Click on Home >>Select Conditional Formatting >> Click on New Rule >> Click on "Use a Formula to determine which cells to format">>Enter the Formula

Step 3: Preview Results

All employees in the Sales department will be highlighted.

image
Preview Results

5. Using Color Scales to Visualize Data

Color Scales use gradient colors to represent high, medium, and low values. We will Apply a Color Scale to Bonus Percentage for demonstration.

Step 1: Select the Bonus Column

Select the Bonus column (E2:E9).

Step 2: Select the Color Scales and Choose the Color Scales

Go to Home Tab, Select the Conditional Formatting, Click on the Color Scales and Choose a Red-Yellow-Green scale (or any other preferred scale).

  • Green: Highest bonus percentage.
  • Yellow: Medium values.
  • Red: Lowest bonus percentage.
Go-to-Home-Tab2
Go to Home Ta >> Click on Conditional Formatting >> Click on Color Scales

Step 3: Preview Results

Choose the Color Scale Pattern and Preview Results.

Preview-Results2
Preview Results

6. Highlighting Blank or Duplicate Cells

Sometimes, blank cells indicate missing data. Conditional Formatting can help identify them easily. We will Highlight Empty Cells in the Dataset for demonstration.

Step 1: Select the entire dataset

Select the Entire Dataset. (In the below example we have selected A2:E9)

image-
Select the entire dataset

Step 2: Select New Rule

Click Home > Conditional Formatting > New Rule.

Go-to-Home-Tab-and-Click-on-New-Rule
Go to Home Tab >>Click on Conditional Formatting >>Select New Rule

Step 3: Select Format only cells that contain.

  • In the drop-down, choose Blanks.
  • Click Format, pick a color (e.g., Green), and click OK.
Home-Tab
Go to Home Tab >>Select Conditional Formatting>>Select New Rule>> Select "Format Only Cells that Contain">>Select "Blanks">> Click on Format >> Choose Color

Step 4: Preview Results

Choose the Color and Preview Results.

Preview-Results3
Preview Results

Editing Conditional Formatting in Excel

You can modify an existing Conditional Formatting Rule in Excel by following these steps:

Step 1: Select the Cells

  • Click on any cell that has a conditional formatting rule applied.

Step 2: Open the Rules Manager

  • Go to the Home tab, click Conditional Formatting, and select Manage Rules.
Conditional Formatting in Excel
Go to Home Home Tab >> Manage Rules

Step 3: Choose the Rule to Edit

  • In the Rules Manager dialog box, choose the rule you want to modify and click Edit Rule
Conditional Formatting in Excel
Select your Desired Rule

Step 4: Make Changes and Apply

  • Update the settings in the Edit Formatting Rule window as needed, then click OK to apply the changes.

Remove Conditional Formatting

You can remove conditional formatting in Excel using two simple methods:

Method 1: Remove Conditional Formatting Using the Clear Rules Option

This method allows you to remove conditional formatting from selected cells or the entire sheet.

Step 1: Select the Cells

  • Highlight the cell range that contains the conditional formatting you want to remove.
  • If you want to remove formatting from the entire sheet, you can skip selecting specific cells.

Step 2: Go to Conditional Formatting

  • Click on the Home tab in the ribbon.
  • In the Styles group, click Conditional Formatting.

Step 3: Clear the Rules

Choose Clear Rules from the drop-down menu.

Select either:

  • Clear Rules from Selected Cells – to remove formatting only from the selected range.
  • Clear Rules from Entire Sheet – to remove all conditional formatting from the worksheet.

You can also use the keyboard Shortcut

Press Alt + H + E + F on your keyboard.

Conditional Formatting in Excel
Select "Clear Rules" >> Clear Rules from Selected Rules

Method 2: Remove Specific Conditional Formatting Using the Rules Manager

This method is useful when you want to edit or remove specific rules without affecting others.

Step 1: Select the Cells

  • Click on any cell within the range that has conditional formatting applied.
  • If you’re unsure, selecting the entire sheet will display all rules in the next step.

Step 2: Open the Rules Manager

  • Go to the Home tab, click Conditional Formatting, and select Manage Rules from the drop-down menu.

Step 3: Choose the Rules to Delete

  • The Conditional Formatting Rules Manager window will appear.
  • From the Show Formatting Rules For drop-down, select either the current selection or the entire sheet.
  • Select the rule you want to remove and click Delete Rule.
Conditional Formatting in Excel
Click "OK"

Method 3: Keyboard Shortcut to Remove Conditional Formatting

Removing conditional formatting in Excel can be a quick and easy task with the right keyboard shortcuts. If you want to remove all the conditional formatting rules from a selected range of cells, you can follow these steps:

Step 1: Select the Cell range

Select the range of cells from which you want to remove the conditional formatting.

Step 2: Press Keys

Press Alt + H + E + F on your keyboard.

This shortcut sequence will open the Clear Rules menu, allowing you to remove conditional formatting from the selected cells. Mastering this shortcut can save you time and streamline your data management process, ensuring your spreadsheets remain clean and organized.

Note: To use the keyboard shortcut provided above, begin by highlighting the cells from which you wish to remove the Conditional Formatting. Afterward, press the designated keys.

Excel Conditional Formatting Best Uses

  • Highlighting Top and Bottom Values: You can use Conditional Formatting to highlight the highest and lowest values in a Dataset so that you can easily identify significant data points.
  • Data Bars and Colors Scales: Represent data visually using data bars or color scales to create intuitive maps, making patterns and trends more apparent.
  • Icons Sets: Apply Icon Sets to cells, by using symbols such as arrows or checkmarks, to effectively assess data against present conditions.

Article Tags :

Similar Reads