×

Conditional Formatting in Excel

Conditional Formatting

What are the conditional formats?

Conditional Formatting is a tool that allows the user to format cells or range of cells based on the selected condition or given criteria. The formatting will keep changing depending on the value of the cell or formula returning value. Conditional Formats apply formats to cells bases on the value in the cell or a group of cells.

Different ways to use Conditional Formatting

Highlight Cells Rules

It is used to highlight the cells based on their values. You can also apply the format on one cell first and then copy the format on other cells using ‘Format Painter’.

Highlight Cells Rules
  • Greater Than – it will highlight all the selected cells which are above a particular value – you can change the value depending upon what you want and can also change the colour with which you want to highlight the cell
  • Less Than – it will highlight all the selected cells which are below a particular value – you can change the value depending upon what you want and can also change the colour with which you want to highlight the cell
  • Between – it will highlight all the selected cells which are above between 2 specified values – you can change the values depending upon what you want and can also change the colour with which you want to highlight the cell
  • Equal to – it will highlight all the selected cells where the value is equal to a specified value – you can change the value depending upon what you want and can also change the colour with which you want to highlight the cell
  • A Text that contains – it will highlight all the selected cells which contain a specific text – it can be a name, a letter, alphanumeric values like combination of numbers and alphabets – you can change the values depending upon what you want and can also change the colour with which you want to highlight the cell
  • A Date Occurring– used for cells consisting of dates - it will highlight all the selected cells where the date falls in one of the options in the drop-down list – yesterday, today, tomorrow, last month, next month, etc.
  • Duplicate Values – It will highlight the cells which have duplicate values or unique values from a group of cells.

Example 1

Objective: Highlight the empty cells in the 'Name' column with yellow color

Name
Thomas E. Vessey
Alan Isaac Rothenberg
Gerard M. Banmiller
John C. Black
Gregory L. Gibson
Ronald J. Carlson
Christopher J. Murphy III
Elmer C. Laslo

Step 1: Select the data. And click on Conditional Formatting-> Highlight Cells Rules-> Text that contains

Highlight the empty cells in the Name column with yellow color

Step 2: From the cell value dialogue box, select the blank option.

cell value dialogue box

Step: 3 The next step is to click on the formal option and fill the yellow colour.

click on the formal option and fill the yellow colour

Step 4: Click on Ok. You will notice, the blank cells have been formatted with yellow colour.

Output

blank cells have been formatted with yellow colour

Example 2

Objective: Prepare a report, in which we want see 90% and above in "green", 60% - 90% in "Yellow" and below to 60% in "Red"

Agent Name Target Achievement Achievement %age
Connor $2,000.00 $1,402.00 91%
Hall $1,500.00 $2,931.00 55%
Bruno $3,000.00 $2,358.00 79%
Stuart $3,000.00 $2,753.00 92%
Craig $3,500.00 $1,209.00 35%
Hiram $2,500.00 $1,558.00 62%
Brenden $1,500.00 $2,744.00 91%

Step 1: Select Conditional formatting-> Highlight Cell Rules -> less than

Conditional formatting- Highlight Cell Rules - less than

Step 2: Select Conditional formatting-> Highlight Cell Rules -> between

Highlight Cell Rules

Step 3: Select Conditional formatting-> Highlight Cell Rules -> greater than

Select Conditional formatting

Output

Conditional Formatting in Excel1

Top/Bottom Rules

Top/ Bottom rules in conditional formatting is used to highlight cells based upon values of a group of cells and not just one cell. This formatting option is only used for cell consisting of numbers.

TopBottom Rules
  • ‘Top 10 Items’ – It highlights the top 10 cells with the largest values. You can change number of items as well along with the colour.
  • ‘Top 10%’ – It highlights 10% cells having largest values. So, if there are 100 cells, it will highlight 10 cells with the highest values. You can change percentage of items as well along with the colour.
  • ‘Bottom 10 Items’ – It highlights 10 cells with the smallest values. You can change number of items as well along with the colour.
  • ‘Bottom 10%’ – It highlights 10% cells based having lowest values. So, if there are 1000 cells, it will highlight 100 cells with the smallest values. You can change percentage of items as well along with the colour.
  • ‘Above Average’ – It highlight all cells which have values above average of all the cells. You can change the colour with which you want to highlight the cell.
  • ‘Below Average’ – It highlight all cells which have values below average of all the cells. You can change the colour with which you want to highlight the cell.

Example 1

Objective: For year 2012 in the table given below, highlight the top 10 values based on costs using 'Conditional Formatting'.

Household Expenditure
Month 2012 2013 2014
January $121 $127 $130
February $131 $138 $140
March $128 $134 $137
April $110 $116 $118
May $90 $95 $97
June $83 $87 $89
July $80 $84 $86
August $87 $91 $93
September $89 $94 $95
October $102 $107 $109
Number $199 $89 $95
December $12 $99 $118

Step 1:  Select the entire column for year 2012 and click on Conditional Formatting-> Top/Bottom Rules-> top 10 Items.

entire column for year 2012 and click on Conditional Formatting

Output

click on Conditional Formatting

Data Bars

The Data bars option helps in data visualization while working on cells consisting of numbers. It adds bars to individual cells – for a cell containing a large value as compared to other cells, the bar will be broader else it will be shorter. For negative values, the bar will be in the opposite direction of the positive values and usually in a different colour.

Data Bars

Example 1

Objectives: Generate random numbers between 50 and 100 and format in Data Bars based on their values.

Range 1
67
55
51
88
95
54
71
56
65
92

Step 1: Select the data and click on Conditional Formatting-> Data Bars. Select the Gradient Fill or Sold fill colours as per your choice. You will get the below table demonstrated in the output.

Select the Gradient Fill or Sold fill colours as per your choice.

Output

Select the Gradient Fill or Sold fill colours as per your choice.

Color Scales

This option also helps in data visualization while working on cells consisting of numbers. It can be used to give a 2-colour scale or a 3-colour scale to the group of cells and will keep on changing the colour as we move from one cell to another.

Color Scales

Icon Sets

These are also used for data visualization and are very similar to colour scales.

Icon Sets

New Rule

The first five options are what we have mentioned above so far. We will discuss the last option of using a formula.

New Rule

‘Use a formula’ – you can call an excel formula to do conditional formatting.

‘Clear Rules’

This can be used to clear the conditional formatting from the selected cell or from the entire worksheet, tables and pivots.

‘Clear Rules’

‘Manage Rules’

Helps in editing the existing rules. Go to the cells whose rule you want to edit and click on Manage rules and then you can change the rules.

Manage Rules

Related Topics

Excel SUBSTITUTE() Function

The SUBSTITUTE() function in excel substitutes/replaces the old text with the new text in a string. SUBSTITUTE function is used to clean data. This function is case-sensitive. Syntax SUBSTITUTE(Text, Old_Text, New_Text, [instance_number]) Parameter Text (required)- This...

2 minutes read.

Excel MOD() Function

Excel MOD() Function The MOD() function in excel returns the remainder after a number is divided by a divisor Syntax MOD(number, divisor) Parameter Number(required)- This parameter represents the number which you want to divide. Divisor(required)- This parameter represents...

1 minute read.

Excel MINUTE() Function

Excel MINUTE() Function The MINUTE() function in excel converts a serial number to minute (0 - 59). Syntax MINUTE (SERIAL_NUMBER) Parameter SERIAL_NUMBER (required)- This parameter represents the date or time from which you want to extract...

1 minute read.

Excel Tutorial for Beginners

What is Excel? Microsoft Excel is a software program included in the Microsoft Office suite. It is a commercial spreadsheet application developed by Microsoft for Windows, macOS, Android, and iOS. It...

5 minutes read.

Decimals in Excel

Microsoft Excel is widely used for calculation purposes for various applications. The calculation consists of numbers which include whole numbers, decimals, integers etc. To perform quick calculations, the numbers should...

5 minutes read.

Excel FIND() Function

The FIND() function in excel finds one text value within another. It is a case-sensitive function. Syntax FIND (find_text, within_text, [start_num]) Parameter find_text (required)- This parameter represents the text to find. within_text (required)- This parameter represents...

1 minute read.

Excel Ribbon Toolbar

Excel Ribbon/Toolbar How does a toolbar look like? The top section of an excel file is called a Ribbon or a toolbar. It has various commands which can be useful for us in our daily work....

6 minutes read.

How to apply Data Protection to the Worksheet?

What do we mean by Data Protection? Data Protection in excel involves in protecting your file/data from some other user and also prevents the following accidents – Accidentally deleting or changing the formulas in...

3 minutes read.

Quarter Dates in Excel

Excel is a combination of numeric values and alphabets. The user's project consists of the date depending upon their accounting and financial analysis. Sometimes there is a need to find...

4 minutes read.

Operators in Excel

In MS Excel, operators are used to defining the operation you want to perform on the used elements or between variables. There are four types of operators: Arithmetic operators, Comparison...

4 minutes read.

Frequency Distribution in Excel

The term Frequency Distribution in Microsoft Excel is mainly used to explain how the data will be spread out. And it could be achieved with the help of the Histogram,...

7 minutes read.

How to print titles in Excel

In Microsoft Excel, if a particular task is completed in the worksheet, the user wants to print the worksheet. While performing this job, the row and column headings will display...

3 minutes read.

How to Highlight Duplicates Words in the Microsoft Excel?

We can easily highlight the values that are duplicated in the selected dataset, whether it could be a column or a row from the particular table, with the help of...

6 minutes read.

Go-To Special function in Excel

Go-to Special The Go-To Special function in Excel allows you to select all cells that meet certain criteria quickly. This command is used to identify specific cells – the ones which...

1 minute read.

Text to Columns

Text to Columns This Excel feature is used to split the cell content name of one cell into multiple columns based on a delimiter, such as a space or a special character or based...

2 minutes read.

How to make use of the Excel Autofit in Excel

In Microsoft Excel, Autofit can be used to adjust and then fix the column and the respective row height to till the maximum limit until and unless it has the...

7 minutes read.

AutoFill in Excel

AutoFill in Excel Excel is known for its credibility to operate repeated and similar tasks automatically. For this purpose, it facilitates an inbuilt feature known as Autofill that recognizes the series of...

3 minutes read.

Excel Axes

What is Excel Axes? Axes are a horizontal or vertical line containing units of measure. There are two types of axes X and Y axes. X is a horizontal and Y...

3 minutes read.

Excel INT() Function

Excel INT() Function The INT() function in excel is used to round a number down to the nearest integer. It removes decimal points from any number value & return rounded down number value in...

1 minute read.

Check Marks in Excel

What is a Check Mark? Among various characters checkmark is one of the characters used to indicate that the item or product in the list is correct, chosen or selected. A...

5 minutes read.