Guidelines and examples for sorting and filtering

advertisement
Guidelines and examples for sorting and filtering
data by color
Sorting and filtering data by color is an eagerly anticipated new feature in Microsoft Office Excel 2007. The following
guidelines and examples can help you shine a brighter light on your Office Excel 2007 reports.
Overview of sorting and filtering data by color and
icon set
Sorting and filtering data, along with conditionally formatting data, are integral parts of data analysis and can help you
answer questions such as the following:
Who has sold more than $50,000 dollars worth of services this month?
Which products have greater than 10% revenue increases from year to year?
Who are the highest performing and lowest performing students in the freshman class?
Where are the exceptions in a summary of profits over the past five years?
What is the overall age distribution of employees?
You sort data to quickly organize your data and to find the data that you want. You filter data to display only the rows
that meet criteria that you specify and hide rows that you do not want displayed, for one or more columns of data.
You conditionally format data to help you visually explore and analyze data, detect critical issues, and identify
patterns and trends. Together, sorting, filtering, and conditionally formatting data can help you and your users make
more effective decisions based on your data.
Using Office Excel 2007, you can sort and filter by format, including cell color and font color, whether you have
manually or conditionally formatted the cells.
You can also sort and filter by an icon set that you created through a conditional format. Use an icon set to annotate
and classify data into three to five categories that are separated by a threshold value. Each icon represents a range
of values. For example in the following table of icon sets, 3 Arrows icon set, the green arrow that points upward
represents higher values, the yellow sideways arrow represents middle values, and the red arrow that points
downward represents lower values.
Table of icon sets
In general, the conditional formatting feature has been greatly expanded in Office Excel 2007. You can: format cells
by using a two-color scale, three-color scale, data bars, and icon sets; format cells that contain specific text, number,
date or time values, top or bottom ranked values, above or below average, unique, or duplicate values; and create
many rules and manage rules more easily.
Find links to more information about sorting, filtering, and conditionally formatting data in the See Also section.
Using color effectively when analyzing data
Almost everyone likes colors. The effective use of color in any document can dramatically improve the document's
attractiveness and readability. Good use of color and icons in your Excel reports improves decision making by helping
to focus users' attention on critical information and by helping users visually understand results. Good use of colors
can provide a positive emotional feeling right from the start. On the other hand, bad use of color can distract users,
and even cause fatigue if over-used. The following sections provide guidelines to help you make good use of colors,
and to avoid bad use of colors.
More about document themes With Office Excel 2007, it is easy to create consistent
themes, and add custom styles and effects. Much of the thought that is required to combine
colors effectively has already been done for you by the use of predefined document themes
that use attractive color schemes. You can quickly and easily format an entire document to
give it a professional and modern look by applying a document theme. A document theme is
a set of formatting choices that includes a set of theme colors, a set of theme fonts
(including heading and body text fonts), and a set of theme effects (including lines and fill
effects). Find links to more information about themes in the See Also section.
Use standard colors and limit the number of colors
When you sort and filter by color, you might choose colors that you prefer, and the results may look good to you. But,
a critical question that needs to be asked is, "Do your users prefer and see the same colors?" Your computer is
capable of displaying 16,777,216 colors in 24-bit color mode. However, most users can only distinguish a tiny fraction
of these colors. Furthermore, color quality can vary on computers. Room lighting, paper quality, screen and printer
resolution, and browser settings all can be different. Up to 10% of the population has some difficulty distinguishing
and seeing some colors. These are important variables that you probably don't have control over.
But you do have control over such variables as color choice, the number of colors, and the worksheet or cell
background. By making good choices based on fundamental research, you can help make your colors communicate
the correct message and interpretation of your data. You can also supplement colors with icons and legends to help
ensure that users understand your intended meaning.
Consider color contrast and background
In general, use colors with a high color saturation, such as bright yellow, medium green, or dark red. Make sure that
the contrast is high between the background and the foreground. For example, use a white or gray worksheet
background with cell colors, or a white or gray cell color with a font color. If you must use a background color or
picture, make the color or picture as light as possible so that the cell or font color is not washed out. If you are relying
just on font color, consider increasing the size of the font or setting the font in bold. The larger the font, the easier it is
for a user to see or distinguish the color. If necessary, adjust or remove the banding or rows or columns because the
banding color might interfere with the cell or font color. All of these considerations go a long way towards helping all
users correctly understand and interpret color.
Avoid using color combinations that might decrease the color visibility or confuse the viewer. You don't want to
inadvertently create eye-popping art or an optical illusion. Consider using a cell border to distinguish problematic
colors, such as red and green, if it is unavoidable to prevent the colors from being next to each other. Use
complementary and contrasting colors to enhance contrast, and avoid using similar colors. It pays to know the basic
color wheel and how to determine similar, contrasting, and complementary colors.
A similar color is one next to another color on the color wheel (for example, violet and orange are similar colors to
red).
A contrasting color is three colors away from a color (for example, blue and green are contrasting colors to red).
Complementary colors are opposite each other on the color wheel (for example, blue-green is the complementary
color of red).
If you have time, test out your colors, run them by a few colleagues, try them out in different lighting conditions, and
experiment with different computer screen and printer settings.
TIP
If you print the document in color, double-check the cell color and cell font for readability. If the cell color is too
dark, consider using a white font to improve readability.
Choosing the best colors for your needs
Need a quick summary? Use
red, yellow, green, or blue,
with a white or gray
background.
Assign meaning to the colors that you choose based on your audience and intended purpose. If necessary, provide a
legend to specifically clarify the meaning of each color. Most people can easily distinguish seven to ten colors in the
same worksheet. Up to 50 colors are possible to distinguish, but would require specialized training, and is beyond the
scope of this article.
The Top 10 colors
When you sort and filter data by color, use the following table to help you decide which colors to choose. These
colors provide the most dramatic contrast, and, in general, are the easiest for most people to distinguish.
You can easily apply these colors to cells and fonts by using the Fill Color or Font Color buttons in the Font group
on the Home tab.
Using colors that naturally convey meaning
When reading financial data, numbers are either in the red (negative) or in the black (positive). A red color conveys
meaning because it is an accepted convention. If you want to highlight negative numbers, then red is a top color
choice. Depending on what type of data that you have, you may be able to use specific colors because they convey
meaning to your audience, or perhaps there is an accepted standard for their meaning. For example:
If your data is about temperature readings, you could use the warm colors (red, yellow, and orange) to indicate
a hotter temperature, and the cool colors (green, blue, and violet) to indicate colder temperatures.
If your data is about topographical data, you could use blue for water, green for vegetation, brown for desert
and mountains, and white for ice and snow.
If your data is about traffic and safety, you could use red for stopped or halted conditions, orange for equipment
danger, yellow for caution, green for safety, and blue for general information.
If your data is about electrical resistors, you could use the standard color code of black, brown, red, orange,
yellow, green, blue, violet, gray, and white.
Walking through some examples
Let us say that you are preparing a set of reports on product descriptions, pricing, and inventory levels. The following
sections illustrate questions that you typically ask about this data, and how you can answer each question by using
color and icon sets.
Sample Data
The following sample data is used in the examples.
To copy the data to a blank workbook, do the following:
1.
Start Microsoft Notepad.
2.
Select the sample text, and then copy and paste the sample text to Notepad.
3.
Save the file with a file name and extension such as Products.csv.
4.
Exit Notepad.
5.
Start Office Excel 2007.
6.
Open the file you saved from Notepad.
7.
Save the file as a .xlsx file.
What are the different types of product packaging?
Problem
You want to find out the different types of containers for your products, but there is no Container column. You can use
the Quantity Per Unit column to manually color each cell, and then sort by color. You can also add a legend to clarify
to the user what each color means.
Results
Solution
1.
To manually color each cell according to the color scheme in the preceding table, click each cell, and then
apply each color by using the Fill Color button in the Font group on the Home tab.
TIP
Use the Format Painter button in the Clipboard group on the Home tab to quickly apply a selected color
to another cell.
2.
Click a cell in the Quantity Per Unit column, and on the Home tab in the Editing group, click Sort & Filter,
and then click Custom Sort.
3.
In the Sort dialog box, select Quantity Per Unit under Column, select Cell Color under Sort On, and then
click Copy Level twice.
4.
Under Order, in the first row, select the red color, in the second row, select the blue color, and in the third row,
select the yellow color.
If a cell does not contain any of the colors, such as the cells colored white, those rows remain in place.
NOTE
The colors that are listed are the available colors in the column. There is no default color sort order, and
you cannot create a custom sort order by using a custom list.
5.
Add a legend using cells on the side of the report by using the following table as a guide.
Legend:
Red
Packages and boxes
Blue
Cans and Tins
Green
Jars and Bottles
White
(Not sure)
Which products have a markup above 67% or below 34%?
Problem
You want to quickly see the highest and lowest markup values at the top of the report.
Results
Solution
1.
Select cells E2:E26, and on the Home tab, in the Style group, click the arrow next to Conditional Formatting,
click Icon Set, and then select the Three Arrows (Colored) icon set.
2.
Right-click a cell in the Markup column, point to Sort, and then click Custom Sort.
3.
In the Sort dialog box, select Markup under Column, select Cell Icon under Sort On, and then click Copy
Level.
4.
Under Order, in the first row, select the green arrow that points upward, and in the second row, select the red
arrow that points upward.
Which products need to be reordered right away?
Problem
You want to quickly generate a report of products that must be reordered right away, and then mail the report to your
staff.
Results
Solution
1.
Select cells I2:I26, and on the Home tab, in the Style group, click the arrow next to Conditional Formatting,
point to Highlight Cells Rules , and then click Equal To.
2.
Enter Yes in the first box, and then select Light Red Fill with Dark Red Text from the second box.
3.
Right-click any formatted cell in the column, point to Filter, and then select Filter By Selected Cell's Color.
TIP
Hover over the Filter button in the column header to see how the column is filtered.
Which products have the highest and lowest prices and costs?
Problem
You want to see the highest and lowest prices and costs grouped together at the top of the report.
Results
Solution
1.
For cells C2:C26 and D2:D26, do the following:

On the Home tab, in the Style group, click the arrow next to Conditional Formatting, point to
Top/Bottom Rules, and then click Top 10 Items.

Enter 1 in the first box, and then select Yellow Fill with Dark Yellow Text from the second box.

On the Home tab, in the Style group, click the arrow next to Conditional Formatting, point to
Top/Bottom Rules, and then click Bottom 10 Items.

2.
Enter 1 in the first box, and then select Green Fill with Dark Green Text from the second box.
For the Cost and Price columns, do the following:

Right-click the lowest value , point to Sort, and then select Sort By Selected Cell's Color.

Right-click the highest value, point to Sort, and then select Sort By Selected Cell's Color.
Download