Conditional Formatting – Excel & G Sheets – **Tips for 2023**

Written by

Editorial Team

Reviewed by

Steve Rynearson

Last updated on November 19, 2023

This tutorial provides an overview of Conditional Formatting in Excel and Google Sheets. Or, scroll to the bottom of the page for 70 tutorials on using Conditional Formatting.

conditional formatting 44

Conditional formatting is a very powerful feature that allows you to automatically apply specific formatting to cells that meet certain criteria and emphasize key attributes of a dataset. Here are some of the most valuable conditional formatting tips.

In this tutorial…

Highlight Cells Rules
Highlight Top Items
Highlight Row Based on Value
Add Data Bars
Add Color Scales
Icon Sets
Manage Conditional Formatting Rules
Hierarchy of Conditional Formatting Rules
Clear Conditional Formatting Rules
Conditional Formatting Rules in Google Sheets

Highlight Cells Rules

The Highlight Cells Rules test each cell they’re applied to against a given condition and formats cells that meet your condition(s). Possibilities for setting these rules is to format cells greater than, less than, or equal to a certain value; between two set values; containing a text string; relating to a certain date; or containing a duplicated value. Below are two examples of Highlight Cells Rules.

Highlight Cells Less Than Certain Value

Say you have a data set with products and accompanying information about them. One piece of information is how many pieces of a particular product you have sold, and you want to highlight only the cells with values less than 10.

conditional formatting 2

  1. First, select the range to apply the formatting (e.g., D2:D8).
  2. Then, in the Ribbon, go to Home > Conditional Formatting > Highlight Cells Rules > Less Than…

conditional formatting 3

  1. The Less Than pop-up appears. In the field to the left, enter the desired value (e.g., 10). In the field to the right, select which type of formatting to apply (Light Red Fill with Dark Red Text).

conditional formatting 5

The resulting formatting shows numbers less than 10 in red.

conditional formatting 6

Highlight Cells That Contain Text

You can use one of the conditional formatting rules to pinpoint where a certain string of text is. Say you have an inventory list and want to highlight all cells that contain the word Wireless.

  1. Select the data range (e.g., D2:D8).
  2. In the Ribbon go to Home > Conditional Formatting > Highlight Cells Rules > Text that Contains…

conditional formatting 8

  1. In the field on the left, enter the text (Wireless), and on the right, select the desired formatting type (Green Fill with Dark Green Text).

conditional formatting 9

Now, all cells with the word Wireless are highlighted in green.

conditional formatting 10 new

Highlight Top Items

Top/Bottom Rules are a great way to quickly locate the top (or bottom) values from the data. Imagine you have a column with number of products sold and want to highlight the three best-selling products.

  1. Select the data range (e.g., D2:D8).
  2. In the Ribbon go to Home > Conditional Formatting > Top/Bottom Rules > Top 10 Items…

conditional formatting 11

  1. In the field to the left, click on the arrow to change the number of items from the top. In the field to the right, choose the desired formatting type.
    If you want to use your own formatting style, select Custom Format and create one.

conditional formatting 12

The resulting formatting shows the top three values in red.

conditional formatting 13

Highlight Entire Row Based on Cell Value

Sometimes, it is much easier to recognize important data when you highlight the whole row instead of a single cell. Say you have a percentage of products sold and want to highlight the entire row when the percentage is greater than 60.

  1. First, select the data range (e.g., A1:F9).
  2. In the Ribbon, go to Home > Conditional Formatting > New Rule…

conditional formatting 33

  1. The New Formatting Rule window opens. As the rule type, choose Use a formula to determine which cells to format. Below that, enter the formula:
=$E2 > 60

Then press Format.

conditional formatting 34 new

  1. In the Format Cells window, choose a fill color and press OK.

conditional formatting 35

For each cell in Column F that has a value greater than 60, the entire corresponding row is highlighted in yellow.

conditional formatting 36

Add Data Bars

Using data bars is a simple way to visually represent the top and bottom values of your data and it is a very effective tool when working on larger datasets.

A data bar’s length in a cell is determined by the values of the other selected cells; the bar is long if the value is high in comparison to the rest of the cells, and vice versa.

  1. Select the data range (e.g., E2:E8).
  2. In the Ribbon, go to Home > Conditional Formatting > Data Bars. Choose a formatting option (choose between gradient and solid fill and choose a color).

conditional formatting 14

As a result, bars are added to each cell. The eye is immediately drawn to the highest value, and the amounts can be compared visually.

conditional formatting 15

Add Color Scales

Using color scales is very similar to using data bars. The only difference is in the visual representation.

The cell with the highest value is assigned a color, the cell with the lowest value is assigned with another one, and all cells in between are assigned a mix of these two colors. You can also choose formatting with three colors; the middle value would be assigned to the third color.

  1. Select the data range (e.g., E2:E8).
  2. In the Ribbon, go to Home > Conditional Formatting > Data Bars. Choose a formatting option. You can choose a color scheme and the order of colors/shades from the default options or create your own.

conditional formatting 16

The resulting formatting shows selected cells with assigned colors.

conditional formatting 17

Icon Sets

Conditional formatting icon sets are a great feature to help you visually represent data with shapes, arrows, checkmarks, or other objects.

  1. Select the data (e.g., E2:E8).
  2. In the Ribbon, go to Home > Conditional Formatting > Icon Sets.
    Choose one of presets (the icons will appear in the inside selected cells straightaway) or click on More Rules… to customize the icon sets.

conditional formatting 18

Checkmarks

You can also depict the data using checkmarks.

Assign cells with a value greater than 67 green checkmark icons, cells with a value between 33 and 67 yellow exclamation icons, and cells with a value less than 33 red X icons.

  1. Select the data (e.g., E2:E8).
  2. In the Ribbon, go to Home > Conditional Formatting > Icon Sets > More Rules…
  3. Choose Icon Sets as format style.
  4. Then choose the desired icon style (checkmark, exclamation point, X) from the drop-down menu.
  5. To set a rule, enter values (67 and 33) in the Value boxes.
  6. Choose the correct type of values (Percent because the selected data is expressed as percentages).

conditional formatting 19

As a result, all cells with a value greater or equal to 67 will have a green checkmark icon in them, all cells with a value less than 67 and greater or equal to 33 will have a yellow exclamation icon, and cells with a value less than 33 will have red X icon.

conditional formatting 20

Manage Conditional Formatting Rules

If you want to make a change in a conditional formatting rule, you can easily do so using the Conditional Formatting Rules Manager.

  1. Select the data range (e.g., A1:F9).
  2. In the Ribbon go to Home > Conditional Formatting > Manage Rules…

conditional formatting 22

  1. The Conditional Formatting Manager window opens. Double-click on the rule you want to change.

conditional formatting 43

  1. This brings up the Edit Formatting Rule window. Once you make all necessary changes, press OK.

conditional formatting 25

You can also use the Conditional Formatting Rules Manager to change the hierarchy of the rules, delete them, or make new ones.

Hierarchy of Conditional Formatting Rules

Using more than one conditional formatting rule at the same time can cause problems because of overlapping. Say you have two rules:

  • First rule: Highlight all cells with cell values greater than 50.
  • Second rule: Highlight the entire row if the value in Column E is greater than 60.

In this case, the second rule row formatting is only applied to cells without the first rule cell formatting, as shown in the picture below.

conditional formatting 37

If you want to give preference to the second rule, you’ll have to change the hierarchy of the rules.

  1. In the Ribbon go to Home > Conditional Formatting > Manage Rules…

conditional formatting 38

  1. This opens the Conditional Formatting Rules Manager window, which shows the current hierarchy of your rules.

conditional formatting 39

  1. To raise the second rule to the top, select it and press the up arrow next to “Delete Rule.” Press OK to finish.

conditional formatting 40

The hierarchy will change, and as a result, rows are highlighted without interruption at the overlap points. Row highlighting supersedes cell highlighting, but since the (red) cell formatting also changes the font color, cells where both conditions apply are highlighted in orange with red font.

conditional formatting 42

Clear Conditional Formatting Rules

Sometimes, you’ll end up with a worksheet with too many conditional formatting rules. That could cause the formatting to be faulty, not matching its intent, or slow down Excel. To fix that, you can delete some (or all) of the conditional formatting rules.

Delete All Rules

To delete all conditional formatting rules, in the Ribbon go to Home > Conditional Formatting > Clear Rules > Clear Rules from Entire Sheet.

conditional formatting 45

If you select a certain data range and you want to delete rules for that range, choose Clear Rules from Selected Cells, instead of from the entire sheet.

Delete Specific Rules

To specifically select which rules you want to delete, use the Manage Rules option.

  1. In the Ribbon go to Home > Conditional Formatting > Manage Rules…

conditional formatting 31

  1. First select This Worksheet in the Show formatting rules for section.
  2. Then select the rule you want to remove and press the Delete rule icon. Then, click OK.

conditional formatting 32

Conditional Formatting Rules in Google Sheets

You can also use conditional formatting rules in Google Sheets to format cells that meet certain criteria, but there are fewer options than there are in Excel.

conditional formatting 46

In the Menu, go to Format > Conditional formatting.

conditional formatting 47

The Conditional format rules pane opens on the right side of the sheet. There are two options for conditional formatting in Google Sheets:

  • Single color: Use this option to highlight all cells in a single color.
  • Color scale: Use this option to visually present the difference between the values in the cells.
  1. Select the data range in the sheet or enter it manually in the box.
  2. Choose the desired format rule from the list.
  3. In the next box down, enter the text or formula.
  4. Now, choose the desired formatting style.
  5. When finished, press Done.

conditional formatting 49

Clear Conditional Formatting Rules in Google Sheets

To clear conditional formatting rules in Google Sheets:

  1. Select the data range (e.g., A1:A5).
  2. In the Menu go to Format > Clear formatting.

conditional formatting 50

As a result, all conditional formatting rules for the selected range are deleted.

conditional formatting 46

More Conditional Formatting

Conditional Formatting
Apply Conditional Formatting Based on Adjacent Cell
Apply Conditional Formatting to Dates
Apply Conditional Formatting to Entire Column
Apply Conditional Formatting to Multiple Rows
Apply Conditional Formatting to Multiple Sheets
Conditional Format Greater Than Or Less Than
Conditional Formatting Based on Another Cell
Conditional Formatting Based on Cell Value / Text
Conditional Formatting Based on Date in Another Cell
Conditional Formatting Based on Formula
Conditional Formatting Dates Overdue
Conditional Formatting Formulas Not Working?
Conditional Formatting If Between Two Numbers
Conditional Formatting If Cell Contains any Text
Conditional Formatting If Cell Contains Specific Text
Conditional Formatting Not Equal
Copy Conditional Formatting
Edit Conditional Formatting
Highlight Blank Cells (Conditional Formatting)
Highlight Cell if Value Exists in Another Column
Highlight Cells If (Conditional Formatting)
Highlight Cells That Begin (Or End) With
Highlight Duplicate Rows
Highlight Duplicate Values
Highlight Entire Row
Highlight Every Other Line
Highlight Rows If (Conditional Formatting)
Highlight Rows That Contain
Highlight the Highest Value
Insert Harvey Balls
Multiple Conditions (And)
Remove Conditional Formatting
Set Cell Color with If Formula
Use Comparison Icon Sets
Use Conditional Formatting With Checkbox
Use Custom Icon Sets
Why is Conditional Formatting Grayed Out?
Compareyes
Compare Two Columns and Highlight Differences
Compare Two Rows
Compare Two Sheets for Differences
Drop Downyes
Add a Drop Down List With Color Formatting
Duplicatesyes
Clear / Remove Duplicates (Cells)
Remove Both Duplicates (Rows)
Remove Unique (Non-Duplicate) Values
Show Only Duplicates
Find & Selectyes
Find and Highlight Something
Highlight Blank Cells
Select Every Other Row
Select Multiple Cells
Use Go To Special
Formatyes
Alternate Row Color
Hide / Suppress Zeros
Make Negative Numbers Red
Formulasyes
Conditionally Format Dates and Times
Date Formula Examples
Highlight Blank Cells -Conditional Formatting
If Then Statements
VLOOKUP Conditional Formatting
XLOOKUP Conditional Formatting
Shortcutsyes
Conditional Formatting Shortcut
Tablesyes
Compare Two Tables
Display Data With Banded Rows
VBAyes
Formatting Numbers VBA
Using Conditional Formatting with VBA
VBA Highlight Cell
VBA Highlight Duplicates in a Range

AI Formula Generator

Try for Free

See all How-To Articles