18.11.2014 Views

Microsoft Office

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Part III<br />

Creating Charts and Graphics<br />

ON the CD-ROM<br />

A workbook with this example is available on the companion CD-ROM. The filename is gauge<br />

chart.xlsx.<br />

One slice of the pie — the slice at the bottom — always consists of 50 percent, and that slice is hidden. (The<br />

slice uses No Fill and No Outline.) The other two slices are apportioned based on the value in cell B1. The<br />

formula in cell 44 is<br />

=MIN(B1,100%)/2<br />

This formula uses the MIN function to display the smaller of two values: either the value in cell B1 or 100<br />

percent. It then divides this value by 2 because only the top half of the pie is relevant. Using the MIN function<br />

prevents the chart from displaying more than 100 percent.<br />

The formula in cell A5 simply calculates the remaining part of the pie — the part to the right of the gauge’s<br />

needle:<br />

FIGURE 20.35<br />

This chart resembles a speedometer gauge and displays a value between 0 and 100 percent.<br />

=50%-A4<br />

The chart’s title was moved below the half-pie. The chart also contains a text box, linked cell B1, that displays<br />

the percent completed.<br />

Displaying conditional colors in a column chart<br />

You may have noticed that the Fill tab of the Format Data Series dialog box has an option labeled Vary<br />

Colors By Point. This option simply uses more colors for the data series. Unfortunately, the colors aren’t<br />

related to the values of the data series.<br />

This section describes how to create a column chart in which the color of each column depends on the<br />

value that it’s displaying. Figure 20.36 shows such a chart (it’s more impressive when you see it in color).<br />

The data used to create the chart is in range A1:F14.<br />

414

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!