You are on page 1of 7

Chapter 10 - Conditional Formatting


You can apply conditional formatting to cells to highlight any important or unusual values:

An example of data bars An example of icon sets

An example of colour scales A rule showing numbers less than 10

Wise Owls Hint

Conditional formatting is particularly useful for highlighting exceptional values in a spreadsheet, such as balances which dont balance or bank acco

Copyright 2017 Page 64

Chapter 10 - Conditional Formatting

10.1 Creating Conditional Formats

Applying a Pre-set Conditional Format

Heres how to apply one of the pre-set conditional formats to a block of cells:

a) Select the cells to which you want to apply conditional formatting.

b) Choose one of the

standard conditional
formatting options on
the HOME tab of the

c) Select the effect you want to produce

(Excel will show you what this will
look like as you hover over it).

You can change the details for any of the formats you set to customise them:

b) Click on the rule you want to change, and choose to edit it.

c) You can control the icons displayed, thresholds and whether you are
using numbers or percentages as delimiters.

a) First choose to
manage the rules
that youve just set
up (whether you
knew it or not!).

Copyright 2017 Page 65

Chapter 10 - Conditional Formatting

Creating your own Conditional Format a Case Study

Suppose that you want to highlight all of the cities having a population of more than 20 million in a

Well change the appearance and

number format of all of the cities having
20 million or more inhabitants, to produce
an effect like the one shown on the right.

To do this, first select the cells as shown above, then choose these options:

a) Select this tool on the HOME tab of the ribbon.

b) We want to pick out certain cells, so well choose to

highlight cells meeting a particular rule.

c) We want all values greater than or equal to 20 million,

so the Greater Than option isnt quite enough so
choose to show More Rules.

d) Choose to format only cells that are greater than or

equal to 20 million.

e) Click on this button to set the Number,

Border and Fill formats for cells meeting
this criterion (the custom number format
used here is #,##0" million").

f) Choose OK twice to apply this conditional

formatting to the selected cells.

Copyright 2017 Page 66

Chapter 10 - Conditional Formatting

10.2 Editing and Deleting Conditional Formats

Every time you create a conditional format, you create a rule. To edit and delete these:

a) As ever, select the cells to which you

want your formatting to apply.

b) Choose to edit Conditional Formatting

on the HOME tab of the ribbon.

c) Choose to manage your created rules.

d) Click on a rule that you want to edit or delete, to select it in the list.

e) Choose to edit or delete this rule by clicking on one of these buttons.

Changing the Order in which Rules Apply

The order in which rules apply matters!

With the
rules in this
order, the
cells appear
as shown on
the right.

However, if you click on this arrow to move the selected rule down, the order of
the rules changes: first we colour the cells which are more than 10 million, then
we colour the ones more than 20 million (see hint below):

A rule can only apply a format to an element that has not already been formatted. Thus the cells
Wise forHint
Owls the second example have already been coloured

Copyright 2017 Page 67

Chapter 10 - Conditional Formatting

10.3 More Sophisticated Rules

So far weve looked just at straightforward rules but rules can also refer to formulae, or perform
statistical calculations.

Picking out Statistical Trends

You can show all films which are above or below the average for a set of data, or reference more
ambitious statistics as shown below:

a) Select a block of cells. Here were going to show all of

the films whose number of academy awards (Oscars) is
more than 2 standard deviations above the average
these are called outliers in statistics.

b) Now choose to create a rule. For simple statistics

Top/Bottom Rules would be enough, but we want
something more ambitious, so choose More Rules.

c) Choose to
format cells
above or below
the average.

d) Here we choose
to format only
cells 2 or more
deviations above
the average.

e) The result is that only a few cells will be formatted (the outliers).
Gravity won 7 Oscars, which is more than 2 standard deviations
from the mean for this dataset of 1.668 (not all of the films are
shown in the diagram).

Copyright 2017 Page 68

Chapter 10 - Conditional Formatting

Using Formulae in Rules

Formulae in rules allow you to format one cell based on the

value of a different one:

In the example below, we want to format all of the cities whose

populations are more than 20 million (or to put it another way, format B2
based on the value of C2, and do the same thing for the other cells in the

Heres how to achieve results like this!

a) As ever, choose the

cells you want to
format (this is the
names of the cities,
not the cells containing
the populations).
b) Create a c) Choose to use d) Click here to select the cells
new rule. a formula. containing the populations.

e) Build up your formula.

This is not yet correct, as
it uses absolute cell
references. Excel will use
the value of cell C2 for all
formatting, and since
Beijing has a population of
more than 20 million, you
will get this:

f) Remove the $ signs to change the absolute

references to relative (one easy way to do
this is to click in each part of the formula
and press F4 ).

Copyright 2017 Page 69

Chapter 10 - Conditional Formatting

10.4 Viewing Conditionally Formatted Cells/Rules

How can you tell whether youve applied conditional formatting to a spreadsheet? Two different
ways are listed below.

Viewing All Conditionally Formatted Cells

To do this, follow these steps:

a) Select the Find & Select tool option on the HOME tab of the ribbon.

b) Choose to highlight all of the conditionally formatted cells in your worksheet.

c) Excel will highlight all

cells with conditional
formatting applied to

Viewing all Conditional Formatting Rules

The other way of looking at a spreadsheet is to show all of the rules which apply to it:

a) Select this option in conditional formatting on the HOME tab of the ribbon.

b) Click on this drop arrow to show for example all of the rules in the
current worksheet.

Copyright 2017 Page 70