• Aucun résultat trouvé

Items offers the opposite choice, enabling you to format the lowest X values in a range

Dans le document Microsoft Excel 2010 (Page 160-168)

Formatting—With Conditions

Bottom 10 Items offers the opposite choice, enabling you to format the lowest X values in a range

Figure 4–112. Where to highlight the top—or bottom—tier of a range of values

It goes without saying, then, that “Top 10” isn’t literal; you can designate the top 20, etc.

Bottom 10 Items offers the opposite choice, enabling you to format the lowest X values in a range.

The Top and Bottom 10% options ask you to format you highest/lowest values in percentage terms, e.g., the highest or lowest 15% of all test scores (Figure 4–113):

Figure 4–113. Playing the percentages: Where to format highest or lowest values in percent terms

Above and Below Average mean what they say—they format all scores that rise above or fall beneath the average of the numbers in the range you’ve selected (Figure 4–114):

Figure 4–114. Above and Below Average formatting options

And to anticipate your next question: values that turn out to be exactly average are excluded from both Above or Below Average; that is, in neither case are average values subject to any Conditional Formatting.

The next collection of options—Data Bars—works differently (Figure 4–115):.

Figure 4–115. Data Bar options

Data Bars offers 12 options, but they all work in the same way, distinguished only by the colors and textures they use. Each Data Bar possibility draws a mini-bar chart in the cell of each value, capturing its magnitude relative to the other values in a range. It’s easy to implement: just select a range, and click on one of the Data Bar options. I’ve clicked on the first option, and have come up with this (Figure 4–116):

Figure 4–116. Data Bars: a mini-chart in each formatted cell

Color Scales capture relative disparities in values by characterizing them with color gradations, either in two or three basic initial colors (Figure 4–117):

Figure 4–117. Chromatic scales: Color Scales options

By selecting the second option on the first row—called the Red-Yellow-Green Color Scale, and applying it to our range of grades, I get this (Figure 4–118):

Figure 4–118. Grade values, colored by score group

In this color scheme, Red captures the highest values, Yellow the intermediate ones, and Green the lowest—all in shadings to reflect fine differences in values.

The final option—Icon Sets—supplies the user with a large assortment of symbols with which to format the relationship between values, and in a range of ways (Figure 4–119):

Figure 4–119. Icon Set options

Directional Icon Sets symbolize values by their position in a percentile scale via the designated icons. Thus if I select the first such option and apply it to the grade range, the conditional format looks like this (Figure 4–120):

Figure 4–120. An arrow icon set in action

Here we see that the highest scores sport an up arrow, the intermediates a flat one, and the lower scores a down arrow.

Shapes represent values with a trove of shapes. If I apply the second selection in the Shapes first column on the grade range, I’ll see this (Figure 4–121):

Figure 4–121. Shape of things to come: the same grades, formatted by shape icons

Here the red diamond captures the highest values, the green circles the intermediates, and the yellow triangles the lowest .

Ratings communicate value relationships through a potpourri of possibilities—stars, bars, pie charts, etc. Thus if I choose the pie chart option (the second selection, first column), we’ll see (Figure 4–

122):

Figure 4–122. Bite-sized pie charts

You’ll note, by the way, that the various icons don’t portray values in precisely calibrated ways.

Look at the screen shot above, and you’ll see that the 82, 81, 83, and 77 all display a three-quarter-blackened pie. That’s because by default Excel organizes the data by their percentage distribution. In the case of the pies above, Excel assigns a clear icon to those data that fall below 20% of the highest value in the data, the one-quarter-filled pie for data that occupy the 21-40% percents, and so on. But in addition to these initial distributions, Excel enables you to customize your own—first by clicking the Manage Rules…

Continuing with our grade book: If we leave the pie format in place, select these grades in C9:C18, and click Manage Rules…, we’ll see this (Figure 4–123):

Figure 4–123. Changing the conditional formatting rules

Click Edit Rule… and observe the dialog box shown in Figure 4–124:

Figure 4–124. Rules are made to be…edited

This is a wide-ranging dialog box that contains numerous options, but for now we’re interested in changing the icon numbers—the score thresholds at which the pies blacken more or less. Note the defaults about which we’ve already spoken.

Moreover, we see that the Select a Rule Type area in the Edit Formatting Rule dialog box lets you change your rule completely; if for example I select Format only values that are above or below average, I’ll be brought here (Figure 4–125):

`

Figure 4–125. Selecting—and changing—a rule type

And if I click the drop-down arrow by Format values that are (Figure 4–126):

Figure 4–126. Additional rule options

I can select any of these choices, including values that fall within 1, 2, or 3 standard deviations from the range average. But the larger point is this: by selecting Edit Rule, you can basically replace your existing Conditional Format with any other sort of rule.

In addition, you can subject the same range to multiple rules. For example, I could compose a Conditional Format to color blue all the cells with test scores in our range that exceed 80, and to color red all cells with scores that fall below 60. That is, we could format our range with the Highlight Cells Rules Greater Than… and Less Than… options. If I went ahead with this plan, my range would take on this appearance (Figure 4–127):

Figure 4–127. Note some cells meet neither criterion and remain white

And that’s fine. But what if I wanted to color all the cells with scores topping 80 blue, and all the cells with scores over 85 green? Our wicket has just gotten stickier—because a score such as 90 meets both conditions. After all, 90 exceeds both 85 and 80—raising the obvious question: which format will I see in such a cell?

That’s a question Excel wants you to answer—because you’ll need to tell the application which of the rules will activate first. Once you execute both rules, you’ll want to select the range and click Manage Rules. Note (Figure 4–128):

Figure 4–128. You need to decide which rule is listed first

The two rules impacting our range are recorded—and in the proper order, because Excel will simply carry out the rule which appears first in the above dialog box—and we want Excel to consider the

>85 rule before >80, for a simple reason. If >80 is listed first, then even the cell containing 90 will turn blue—and you’ll never get to >85.

To allow you to arrange your rules in the proper order, you can click on any rule in the Rules Manager and then click the down arrow button (which the arrow in Figure 4–128 points to).

And if you’ve messed up or simply want to start over, you can purge your worksheet of all your Conditional Formats, either for particular ranges or the entire sheet, by clicking (Figure 4–129):

Figure 4–129. The Clear Rules option And choose the appropriate option.

While there’s a large set of permutations crowded into Conditional Formatting, we’ve introduced the important basics, and you’ll find that with experimentation many of its other features will come to light.

Dans le document Microsoft Excel 2010 (Page 160-168)