Conditional Formatting
Conditional Formatting
Conditional
Formatting &
Data
Validation
IT Training
St. George’s, University of
London
Microsoft Excel 2013
Contents
Understanding Conditional Formatting ................................................................................... 1
Formatting Cells Containing Values ................................................................................... 2
Clearing Conditional Formatting ......................................................................................... 3
More Cell Formatting Options ............................................................................................. 4
Top Ten Items ..................................................................................................................... 5
More Top And Bottom Formatting Options ......................................................................... 6
Working With Data Bars...................................................................................................... 7
Working With Colour Scales ............................................................................................... 8
Working With Icon Sets....................................................................................................... 9
THE CONDITIONAL FORMATTING RULES M ANAGER .............................................................. 10
CREATING CUSTOM RULES ................................................................................................. 11
M ANAGING RULES .............................................................................................................. 12
CLEARING RULES ............................................................................................................... 13
Practice Exercise .............................................................................................................. 14
PRACTICE EXERCISE SAMPLE.............................................................................................. 15
Understanding Data Validation ............................................................................................... 16
Creating A Number Range Validation ............................................................................... 17
Testing A Validation .......................................................................................................... 18
Creating An Input Message .............................................................................................. 19
Creating An Error Message .............................................................................................. 20
Creating A Drop Down List ............................................................................................... 21
Using Formulas As Validation Criteria .............................................................................. 22
Circling Invalid Data .......................................................................................................... 23
Removing Invalid Circles .................................................................................................. 24
Copying Validation Settings .............................................................................................. 25
PRACTICE EXERCISE ........................................................................................................... 26
PRACTICE EXERCISE SAMPLE.............................................................................................. 27
If you have a St. George’s username and password you can access all the files that goes
with this manual.
Files can be found in a folder on the N drive in the IT Training folder named:
Excel - Conditional Formatting & Data Validation
Coloured scales
Icons
Coloured bars
E1321 Conditional
Formatting_1.xlsx...
1
Select the range C4:H10
This includes all of the
3
sales for BMW motor
vehicles…
Click on Conditional
Formatting in the Styles
group, then select Clear
Rules from Entire Sheet
to clear the formatting 6
2
Try This Yourself:
Continue using the
Same File
Select Green-Yellow-Red
Colour Scale
4
Try This Yourself:
Before starting this exercise you
Open
File
=C5<=INDIRECT(“$B$”&ROW())
and make the formatting Italic and
Red
MANAGING RULES
Conditional formatting rules can be created, a range of cells, these rules are evaluated in the
edited, deleted and viewed in the Conditional order in which they are listed in this dialog box. You
Formatting Rules Manager dialog box. When can change the order to give some rules
two or more conditional formatting rules apply to precedence over others.
CLEARING RULES
There may be times when you will need to worksheet using the Conditional Formatting
permanently remove a rule from a selected range Rules Manager dialog box. You can also clear
without affecting other rules for that range. You rules from different elements of your data.
can delete conditional formatting rules from a
PRACTICE EXERCISE
Conditional Formatting
INFOCUS
Tasks: Completed:
Before starting this exercise you MUST have completed all of the topics in
the chapter Conditional Formatting…
In the range C4:H9 highlight all of the cells where sales has been below
10,000
In the range I4:I9 highlight in green all of the cells where the sales has
been between 53,000 and 75,000
Format the range C15:H15 with the 3 Symbols (Circled) icon set
Validation Criteria
You can specify the range of values allowed in a cell. If a user attempts to enter a value outside the
specified range, an error message will display. For example, you could limit the possible entries in a cell
to numbers between 1 and 12.
This is an example of
an input message
Drop-Down Lists
Drop-down lists can be attached to cells to provide a list of valid options for a user. This is ideal where
there is a limited number of possible values for a cell, such as the days of the week.
Formulas
As well as being able to set specific limits for values, you can use formulas to create dynamic ranges of
values. For example, the Today() function can be used to calculate today’s date. As validation criteria,
this could be used to ensure that a user does not enter a future date in a cell, or to ensure that the date
is not too far in the past.
1
Try This Yourself:
Before starting this
Open
2
Click on the DATA tab,
then click on the top half of
Data Validation in the
Data Tools group
This will display the
Settings tab of the Data
Validation dialog box…
Press
Maximum
, then type 199 in
Click on [OK]
Nothing appears to have
happened to the cell, but
the validation criteria will
control what you can type
into it
TESTING A VALIDATION
Any data validation applied to a worksheet entry of invalid numbers, but that you have allowed
should be tested thoroughly before it is for all possible situations. You must also ensure
unleashed on any unsuspecting users. You must that any messages that appear explain clearly how
ensure that it not only prevents or dissuades the to correct the error that has been made.
2
Try This Yourself:
Continue using the
Same File
Click on [Retry]
This will select the
contents of the cell so that 4
you can type another
number...
5
Try This Yourself:
Continue using the
Same File
Click on [OK]
As cell A10 is still
selected, the input
message is displayed
3
Try This Yourself:
Continue using the previous file
Same
5
Click on the drop arrow for
Style, then select Information
Notice that the Stop icon has
changed to an Information
icon...
Click on [OK]
2
Try This Yourself:
Continue using the previous
Same
5
Try This Yourself:
Continue using the previous
Same
Click on [OK]
2
Try This Yourself:
Before starting this exercise
Open
E1365 Data
Validation_8.xlsx...
4
Try This Yourself:
Continue using the
Same File
Press
the range
+ to copy
Select A11:J20
This is the destination
range...
Click on Validation in
Paste to select it 7
PRACTICE EXERCISE
Validating Data
Tasks: Completed:
Before starting this exercise you MUST have completed all of the topics in
the chapter Validating Data…
Enter the two additional records as shown on the following page, using
dates of choice in the last 100 days
You will need to copy the formulas in cells F23 and H23 down. Your
worksheet should look similar to that shown on the following page,
although the Renewal Date will vary...