The Wayback Machine - https://web.archive.org/web/20250114010328/https://www.geeksforgeeks.org/excel-conditional-formatting/
Open In App

Conditional Formatting in Excel

Last Updated : 26 Jun, 2024
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Conditional Formatting in Excel is a game-changer for anyone dealing with large datasets. This feature allows you to automatically apply formatting, such as colors and icons, to cells that meet specific criteria. With conditional formatting Excel formulas, you can customize your data presentation and highlight key information effortlessly. Whether you need to create a heatmap, highlight duplicates, or show trends, conditional formatting in excel with formula makes it simple and effective. Moreover, you can even apply conditional formatting in Excel based on other cells, enabling dynamic and interactive data visualization. Unlock the full potential of your data with conditional formatting Excel and transform the way you analyze information.

Conditional-Formatting-in-Excel

What is a Conditional Formatting in Excel

Conditional Formatting is a feature in an Excel spreadsheet. It is used to maintain the status of the result easily. It is most often used as color-based formatting to highlight, emphasize, or differentiate among data and information stored in an Excel spreadsheet.

When it comes to applying alternative forms to data that fit particular criteria, Excel conditional formatting is a highly useful feature. It can make it easier for you to draw attention to the key details in your spreadsheets and quickly identify differences in cell values.

Types of Conditional Formatting Visualisation

You can use preset rules, including Color scales, Data Bars, Icon Sets, Sort filters, etc. to conditionally format your data, or you can construct your own rules that specify when and how the selected cells should be highlighted.

Data Bars

Similar to a bar graph, data bars are horizontal bars that are added to each cell

Conditional Formatting in Excel

Data Bars

Color scales

Alter each cell’s color depending on its value. A two- or three-color gradient is used for each color scale

Conditional Formatting in Excel

Color Scales

Icon Sets

Based on the value of each cell, icon sets assign a distinct icon to each cell.

Conditional Formatting in Excel

Icon Sets

Where is Conditional Formatting in Excel

Navigate to the Home tab, access the Style group, and select the dropdown arrow adjacent to Conditional Formatting. Then, opt for Top/Bottom Rules. It’s important to note that you can find Conditional Formatting in the same location across Excel versions from 2010 to Excel 365.

Quick Tip: Go to Home tab > Select Conditional formatting > Select Rule

Conditional Formatting in Excel

Go to Home Tab >> Click on “Conditional Formatting”

How to Use Conditional Formatting in Excel

Step 1: Select the Cells

Select the cells you want to format in the Spreadsheet

Step 2: Click on Conditional Formatting

Click on Conditional Formatting, On the Home tab, in the Styles group

Step 3: From a Set of Preset Rules, Pick the Required One

From a set of preset rules, pick the one that best serves your needs

Conditional Formatting in Excel

Select Highlight Cell Rules

Step 4: Enter the Value and Select the Chosen Format from the Drop-Down List

Enter the value in the box on the left of the dialogue box and select the chosen format from the drop-down list on the right (with Default Light Red Fill with Dark Red Text)

Conditional Formatting in Excel

Enter Values >> Choose Format

Likewise, you have the flexibility to choose a different rule type that better suits your data. For instance, you can opt for:

  • Greater than or equal to
  • Between two values
  • Text that contains specific words or characters
  • Date occurring in a certain range
  • Duplicate values

How to Use a Preset Rule with Custom Formatting

You can select any other color for the background, text, or borders of the cells if none of the standard layouts appeals to you. This is how:

Step 1: Pick Custom Format

Pick Custom Format, In the preset rule dialogue box, from the drop-down list on the right 

Step 2: Edit the Format Cells and Click Ok

Change between the Font, Border, and Fill tabs in the Format Cells dialogue window to select the preferred font style, border style, and background color, respectively, click OK.

Conditional Formatting in Excel

Edit Format Cells >> click “OK”

Step 3: Click OK to Apply the Custom Formatting of your Choice

Conditional Formatting in Excel

Click “OK”

How to Create a New Conditional Formatting Rule in Excel

You can create a new Conditional Formatting Rule in Excel from scratch. To do so, follow these steps:

Step 1: Select the Cell or Cells you Want to Format

Step 2: Navigate to the Home Tab and Select Conditional Formatting and Click New Rule

Conditional Formatting in Excel

Select “Conditional Formatting” >> Select “New Rules”

Step 3: Select the Rule Type and Click Ok

Now select the rule type, in the New Formatting Rule dialog box

Conditional Formatting in Excel

Select the Rule Type >> Click Ok

Step 4: Click the Format button, Choose the Color, and Click Ok

Conditional Formatting in Excel

Click on Format> choose Color

Step 5: Preview Result

Conditional Formatting in Excel

New Rule Applied

How to Edit Conditional Formatting Rules in Excel

To make any changes in an already existing Formatting Rule in Excel, follow these steps:

Step 1: Select the Cells

Select any cell to which a rule already applies.

Conditional Formatting in Excel

Select the Cells

Step 2: Navigate to the Home Tab and Click on Manage Rules under Conditional Formatting

Conditional Formatting in Excel

Go to Home Home Tab >> Manage Rules

Step 3: Select the Rule you Want to Edit

This will open the Rules Manager dialog box, select the rule you want to modify, then Click on Edit Rule. 

Conditional Formatting in Excel

Select your Desired Rule

Step 4: Make the Changes and Click Ok

Make the required changes in the Edit Formatting Rule dialogue window, Click on Ok 

Conditional Formatting Excel Formula Examples

Here are some Scenario-Based Examples of Conditional Formatting in Excel:

How to Find Duplicates in Excel

Step 1: Select the Cells in which you want to Find Duplicates

Select the cells where you want to identify duplicate values. For example: select the column TOT as shown in the figure.

Conditional Formatting in Excel

Select the Data

Step 2: Navigate to the Home Tab and Click on Cell Formatting

Click on the Conditional Formatting and click on new rules. Now a window appears, select ‘format only unique and duplicate values’ and click on the format.

Conditional Formatting in Excel

Go to the Conditional Formatting >> Cell Formatting

Step 3: Choose the Color

Select the Fill option in the tab and choose the background color and click ok.

Conditional Formatting in Excel

Choose the Color

Step 4: Preview Duplicates

Now the duplicate values as shown in the figure.

Conditional Formatting in Excel

Preview Results

How to Highlight Cells with Value Greater or Less than a Number in Excel

Follow the below steps for highlighting cells with a value greater or less than a given number:

Step 1: Select the Cells

Select the cells that you want to highlight with Greater or less than a number.

Conditional Formatting in Excel

Select the cells

Step 2: Navigate to the Home Tab and Click on Conditional Formatting

Click on the conditional formatting and click on new rules. Now select “Format all cells based on their values“. In the ‘Minimum’ and choose the value you want to identify the lesser values and choose the color. Similarly, In the Maximum and choose the value you want to identify the lesser values and choose the color. And click ok. 

Conditional Formatting in Excel

Go to Conditional Formatting >> New Rule

Step 3: Preview Result

In the below figure, the values with green color indicate greater values and the values with red color indicate fewer values.

Conditional Formatting in Excel

Preview Results

How to Highlight Top or Bottom values in Excel

Step 1: Select the Cells where you want to Highlight Top and Bottom N items

To highlight the top and/or the bottom N items select the cells where you want to highlight top and bottom N items .

Step 2: Navigate to the Home tab and Click on the Conditional Formatting

Step 3: Choose Top/Bottom Cells

Click on the conditional formatting->Top/bottom cells->Top 10 Items. Choose a value in format cells that rank at the top and choose the format and click ok.

Conditional Formatting in Excel

Click on Conditional Formatting > Top/Bottom Rules > Top 10

Step 4: Preview the Result

In the below figure, the red color indicates the top 5 values in rank.

Conditional Formatting in Excel

Preview Result

How to Copy Conditional Formatting to Another Cell in Excel

You won’t need to start over when applying a conditional format you’ve already established to different data. To transfer the current conditional formatting rule(s) to another data collection, just utilize Format Painter.

Step 1: Choose the cell whose Conditional Formatting you want to Copy

Step 2: Click on Format Painter under Home

Click on the first cell in the range you want to format, then drag the paintbrush down to the last cell to paste the copied formatting.

Conditional Formatting in Excel

Copy Excel Conditional Formatting

How to Remove Conditional Formatting in Excel

There are two easy ways to delete conditional formatting rules

Step 1: Select the BestChoice after choosing the desired cell range

Step 2: Click Conditional Formatting then Select Clear Rules

Conditional Formatting in Excel

Select “Clear Rules” >> Clear Rules from Selected Rules

Remove Conditional Formatting Rules using Conditional Formatting Rules Manager

Step 1: Select the Rule

Step 2: Navigate to the Home Button and Select Conditional Formatting

Step 3: Select Conditional Formatting Rules Manager and Select Delete Rule

Under the Conditional Formatting Rules Manager

Conditional Formatting in Excel

Click “OK”

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

  1. 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.
  2. Data Bars and Colors Scales: Represent data visually using data bars or color scales to create intuitive maps, making patterns and trends more apparent.
  3. Icons Sets: Apply Icon Sets to cells, by using symbols such as arrows or checkmarks, to quickly assess data against preset conditions.

Advanced Conditional Formatting Techniques

  1. Formulas in Conditional Formatting: You can use custom formulas to create complex conditions for formatting. This can help you for more precise control over the formatting rules.
  2. Cell Reference in Conditional Formatting: You can apply Conditional Formatting dynamically based on values in other cells using Cell References.
  3. Managing Rules: You can efficiently Manage and organize your conditional formatting rules through the “Conditional Formatting Rules Manager”.

Conclusion

Mastering conditional formatting in Excel can revolutionize the way you handle data, providing clearer insights and more effective presentations. By leveraging conditional formatting Excel formulas and applying rules based on other cells, you can create dynamic and interactive data visualizations that highlight key information effortlessly. This powerful feature not only enhances your data analysis capabilities but also improves your efficiency and decision-making processes.

Conditional Formatting in Excel – FAQs

How do I use conditional formatting in Excel?

Here are some following steps by which you can use conditional Formatting:

  • Select Your Data Range
  • Open Conditional Formatting Menu
  • Choose a Rule Type
  • Set Your Criteria
  • Apply the Rule

What is the key for conditional formatting in Excel?

There is no single shortcut key for conditional formatting, but you can access the Conditional Formatting menu with the following sequence:

Press Alt + H + L to open the Conditional Formatting menu.

What are the four types of conditional formatting in Excel?

The four types of conditional formatting are:

  • Highlight Cells Rules: Format cells that contain specific text, values, dates, or duplicate values.
  • Top/Bottom Rules: Format the highest or lowest values, top 10 items, or above/below average values.
  • Data Bars: Add horizontal bars inside the cells to visually represent the data magnitude.
  • Color Scales: Apply a gradient of colors to represent the data values, making it easy to spot trends.

What are the three rules in conditional formatting in Excel?

The three rules are as follows:

  • Value-Based Rules
  • Text-Based Rules
  • Date-Based Rules

What is excel conditional formatting formula if?

Conditional Formatting in Excel can be enhanced using the IF formula to apply specific formats based on custom criteria.

  • Select the Range of Cells
  • Open Conditional Formatting Menu
  • Choose ‘New Rule’
  • Select ‘Use a Formula to Determine Which Cells to Format’
  • Enter the IF FormulaSet the Format
  • Apply the Rule

Our GATE 2026 Courses for CSE & DA offer live and recorded lectures from GATE experts, Quizzes, Subject-Wise Mock Tests, PYQs and practice questions, and Full-Length Mock Tests to ensure you’re well-prepared for the toughest questions.

Take the Three 90 Challenge! Complete 90% of the course in 90 days and earn a 90% refund. Stay motivated, track your progress, and make the most of your preparation time. Plus, enjoy exclusive features like:

--> All India Mock Test
--> Live GATE CSE & DA Mentorship Classes
--> Live Doubt Solving Sessions

Join now and stay ahead in your GATE 2026 journey!


Next Article
Article Tags :

Similar Reads

three90RightbarBannerImg