conditional-formatting

advertisement
Computer Data Analysis
CGS 2518
Instructor: Greg Shaw
Conditional Formatting
Conditional formatting applies a format to a cell only if it meets a
specified condition. For example, a conditional format could make
positive numbers black and negative numbers red.
Excel has 5 conditional formats - Data Bars, Color Scales, Icon
Sets, Highlight Cells Rules, and Top/Bottom Rules, - each of which
is explained below
 Data Bars (Similar to a Bar Chart)
Displays gradient-filled horizontal bars in which the bar length
shows the value in relation to other values in the column

To add data bars to a range
1.
2.
3.

Select the range or ranges
Home | Styles | Conditional Formatting | Data Bars
Select a data bar color from the list
The bars will be updated if any values in the range change
 Color Scales
Formats cells with different fill colors of your choice, assigning
one color to the highest value, another to the lowest, and a blend
of these colors to all other values

To format a range with color scales
1.
2.
3.

Select the range or ranges
Home | Styles | Conditional Formatting | Color Scales
Select a color scale from the list
The fill colors will change if any values in the range change
 Icon Sets
Displays icons (i.e. small symbols or graphics) in cells to rank the
cell contents into 3 to 5 categories, where each icon is assigned to
a range of values

To format a range with icon sets
1.
2.
3.

Select the range or ranges
Home | Styles | Conditional Formatting | Icon Sets
Select a set of icons from the list
The icon displayed will change if any values in the range change
 Highlight Cells Rules
Another kind of conditional formatting applies highlights
colors and/or fill colors) to cells, based on their values


The
criteria
for
highlighting
cells
–
known
as
the
highlighting “rules” - include whether a value is greater
than, less than, or equal to a specified number, or lies
between two specified numbers, whether a cell contains
specified text, whether a cell contains a specified date, and
cells that contain duplicate or unique values
To add highlights to a range
1.
2.
3.
4.

(text
Select
Home |
Select
Choose
the range or ranges
Styles | Conditional Formatting | Highlight Cells Rules
a rule and enter the specific value(s)
a highlight color scheme from the with drop-down list
The highlights will be updated if any values in the range change
 Top/Bottom Rules
Similar to the highlight cells rules, this kind of conditional
formatting applies highlights to cells containing values which are
among the highest or lowest in the selected range


To add highlights based on Top/Bottom Rules to a range
1.
2.
3.
4.

The number of cells to be highlighted may be specified as a
constant (e.g., the top 10 or bottom 5) or as a per cent of
the total number of cells (e.g., the top 5% or bottom 10%)
Select
Home |
Select
Choose
the range or ranges
Styles | Conditional Formatting | Top/Bottom Rules
a rule and enter the specific number or per cent
a highlight color scheme from the with drop-down list
The highlights will be updated if any values in the range change
 Removing Conditional Formatting
 To remove conditional formats from a selected range or ranges
1.
2.

To remove all conditional formats from an Excel Table
1.
2.

Select the range or ranges
Home | Styles | Conditional Formatting | Clear Rules
| Clear Rules from Selected Cells
Click any cell in the table
Home | Styles | Conditional Formatting | Clear Rules
| Clear Rules from This Table
To remove all conditional formats from an entire worksheet
Home | Styles | Conditional Formatting | Clear Rules
| Clear Rules from Entire Sheet
Download