6. Advanced Formatting
6. Advanced Formatting
Advanced Formatting
Conditional formatting enables you to automatically draw attention to interesting, exciting, concerning, unusual, or
other data. Uses of conditional formatting include:
1. Highlight Cells Rules . Highlight numbers greater than, less than, between, or equal to specific numbers.
Also highlight cells that include specific text, dates with a specified range, and duplicate values.
2. Top/Bottom Rules . Highlight the top or bottom X or X% results in a data set, or numbers that are above or
below average.
3. Data Bars . Visually display values by filling portions of cells with colors based on the values.
4. Color Scales . Visually display values by associating cell colors with the values in the cells.
6. Formatting Based on Values in Other Cells . Formatting can be based on the value within the cell itself or
on the value within another cell.
1. Choose the cell or cells to which you wish to apply conditional formatting.
2. On the Home tab, in the Styles group, click the Conditional Formatting command:
3. Select the rule or format you wish to apply by clicking on it:
Th
is
do
cu
me
nt
No ron belon
un d gs
au y@i
tho nix to RO
riz i
ed ndo. ND
IH
co co ID
pie .id AY
sa AT
llo .
we
d!
4. If necessary, fill out the requested information in the dialog box that appears.
Watch and follow along as your instructor shows you some of the many ways you can use
conditional formatting. YA YA
T. T.
15 to 25 minutes
In this exercise, you will practice using conditional formatting in a number of different ways.
2. In Sheet1, in the Listing Price column, highlight the most expensive 20% of houses using yellow fill with dark
yellow text.
3. In Sheet1, in the Town column, highlight all cells containing "Fayetteville" using light red fill.
4. In Sheet1, in the Square Feet column, use blue gradient fill to visually demonstrate the size of each house.
5. In Sheet1, in the Bedrooms column, highlight all cells showing 4 bedrooms using a red border.
6. In Sheet1, in the Bathrooms column, use icon indicators to draw attention to houses that have 1 or 4
bathrooms.
7. In Sheet2, in the Date Due column, highlight all past dates in light red fill with dark red text, current dates in
yellow fill with dark yellow text, and future dates in green fill with dark green text. Tip: When creating the rules,
instead of entering today's actual date, enter "=today()" (do not enter the quotation marks).
Exercise Solution
1. In Sheet1 in the Listing Price column, highlight the most expensive 20% of houses using yellow fill with dark
yellow text.
A. Select column B.
B. On the Home tab, in the Styles group, click Conditional Formatting , Top/Bottom Rules , and then
Top 10%... :
No ron
un d
au y@i
tho n
riz ixind
ed o
co .co.i
pie d
sa YA
llo T.
we
d!
2. In Sheet1, in the Town column, highlight all cells containing "Fayetteville" using light red fill.
A. Select column C.
C. In the Equal To dialog box, enter "Fayetteville", select Light Red Fill , and click OK :
3. In Sheet1, in the Square Feet column, use blue gradient fill to visually demonstrate the size of each house.
A. Select column D.
Th
is
do
cu
me
nt
No ron belon
un d gs
au y@i
tho nix to RO
riz i
ed ndo. ND
IH
co co ID
pie . id A
sa
llo
we
d!
4. In Sheet1, in the Bedrooms column, highlight all cells showing 4 bedrooms with a red border.
A. Select column E.
5. In Sheet1, in the Bathrooms column, use icon indicators to draw attention to houses that have 1 or 4
bathrooms.
A. Select column F.
B. On the Home tab, in the Styles group, click Conditional Formatting , Icon Sets , and then select one
of the options under Indicators :
Th
is
do
cu
me
nt
No ron be
lon
un dy
au @ gs to
tho in RO
riz ixind
ed o.c NDI
co HI
pie o.id DA
sa YA
llo T.
we
d!
6. In Sheet2, in the Date Due column, highlight all past dates in light red fill with dark red text, current dates in
yellow fill with dark yellow text, and future dates in green fill with dark green text.
Th
is
do
cu
me
nt
No ron belon
un d gs
au y@i
tho nix to RO
riz i
ed ndo. ND
IH
co co ID
pie .id AY
sa AT
llo .
we
d!
Th
is
do
cu
me
nt
No ron be
lon
un dy
au @ gs to
tho in RO
riz ixind
ed o.c NDI
co HI
pie o.id DA
sa YA
llo T.
we
d!
E. In the Equal To dialog box, enter today's date, select Yellow Fill with Dark Yellow Text , and click OK :
Th
is
do
cu
me
nt
No ron belon
un d gs
au y@i
tho nix to RO
riz i
ed ndo. ND
IH
co co ID
pi . id A
F. On the Home tab, in the Styles group, click Conditional Formatting ,
Th
is
do
cu
me
nt
No ron belon
un d gs
au y@i
tho nix to RO
riz i
ed ndo. ND
IH
co co ID
pie .id AY
sa AT
llo .
we
d!
Styles can be applied both to tables and to individual or groups of cells. Styles can also be applied to charts and
illustrations, though applying styles to charts and illustrations is not covered in this lesson.
.
If your data is not already formatted as a table, then convert it to a table:
1. Select the cells you wish to convert to a table. If you select just one cell, then Excel will guess which other
cells you wish to include and will ask you to verify.
2. On the Home tab, in the Styles group, click the Format as Table command:
4. In the Format As Table dialog box, verify which cells contain the data for the table and click OK :
Note: Lists can also be converted to tables using the Table command on the Insert tab. This is covered in the
lesson on working with lists.
2. Click the More arrow in the Table Styles group to see all the styles available:
3. Move your mouse over the many different styles available in the Table Styles group to see what your table
will look like if you select that style:
4. Select one of the styles by clicking on it.
3. Move your mouse over the many different styles available in the drop-down list to see what your cell(s) will
look like if you select that style:
4. Select one of the options from the drop-down list by clicking on it.
Th Th
is is
do do
Copy Styles from c u cu
meTemplate to Template me
nt nt
N ron b e No ron belon
When you saveo uanstyle, it islothen
n available in the Custom styles category, appearing
d gs un d on the gs Cell Styles menu
au y@i to au y@i to
t ho
when a worksheet contains n R t ho n ixin RO
riz irelevant
xin
do
Ocells.
N r i z do ND
ed D ed
co .co.i I HID co .co.i I HID
pi d A pi d A
Exercise 21 Working with Styles
5 to 15 minutes
In this exercise, you will convert data to a table, change the format of the table, and format cells.
2. Convert the data in cells A3:E8 to a table using one of the Light styles.
Exercise Solution
1. Convert the data in cells A3:E8 to a table, using one of the Light styles.
B. On the Home tab, in the Styles group, click the Format as Table command:
D. In the Format as Table dialog box, verify which cells contain the data for the table and click OK :
B. On the HOME tab, in the Styles group, click the Cell Styles command:
You can save a workbook as a template to use in the future. To create a custom template:
1. Select the File menu tab and then click Save As . Navigate to where you want to save the template by
clicking Browse .
2. In the Save As dialog box, from the Save as type drop-down list, select one of the template options.
3. Click Save to save the template (by default, it is saved in the following location: C:\Users\user
name\Documents\Custom Office Templates).
1. Select the File menu tab and then click Open . Navigate to the C:\Users\user name\Documents\Custom
Office Templates folder.
3. From Backstage view , select Save As, and then from the Save as type drop-down list, select one of the
template options.
Conclusion
.
In this lesson, you learned to use conditional formatting .
to display cells differently based on their values, to quickly
format tables using styles, and to format cells using styles.