Está en la página 1de 8

Custom Format for Chart

Minimum and Maximum.


Ever want to apply special formatting to just a certain point? This example shows
you how to highlight the minimum and maximum values of a series by using a
different marker for each, and data labels. We'll accomplish this with two extra
series in the chart, one for minimum and one for maximum.

The Data

The example uses a simple data set, a series of values in A2:A22, formulas to
indicate the maximum and minimum values in B2:C32, and headers in A1:C1. The
formula in B2 is:

=IF($A2=MAX($A$2:$A$22),$A2,NA())

and the formula in C2 is:

=IF($A2=MIN($A$2:$A$22),$A2,NA())

Enter the formulas in B2:C2, select the range B2:C22, and press Ctrl-D to fill them
down into the entire selected range.

  A B C
1 Values Max Min
2 5.3 #N/A #N/A
3 6.2 #N/A #N/A
4 6.1 #N/A #N/A
5 13.0 13.0 #N/A
6 8.7 #N/A #N/A
7 9.2 #N/A #N/A
8 7.9 #N/A #N/A
9 4.7 #N/A #N/A
10 7.9 #N/A #N/A
11 4.9 #N/A #N/A
12 6.7 #N/A #N/A
13 6.5 #N/A #N/A
14 7.6 #N/A #N/A
15 9.2 #N/A #N/A
16 5.4 #N/A #N/A
17 9.0 #N/A #N/A
18 7.7 #N/A #N/A
19 10.4 #N/A #N/A
20 4.4 #N/A #N/A
21 3.9 #N/A 3.9
22 7.1 #N/A #N/A

Columns B and C contain #N/A error values except for the maximum and minimum
values from column A, thanks to the clever formulas used in the range. Excel will
only chart the numerical values, not the error values. If we had used "" to fill the
range instead of NA(), we would get apparently blank cells, which the chart would
treat as zeros, and plot along the horizontal axis.
Constructing and Formatting the Chart

Select the three columns of data, including the top row with headers, and construct
a line chart, with lines and no markers. The chart has three series, but Min and Max
don't appear, because there is only one point in each, and a line is the shortest
distance between TWO points.

Click on the legend, then click on the legend key for the Max series (the short green
line segment). Press F1 to bring up the Format Series dialog. On the Patterns tab,
select an appropriate marker (if you want to show a marker), and set the line to
None. Repeat this with the Min series.

Double click the Max series, and on the Data Labels tab, select Show Values, and
press Enter. Double click on the label, and on the Alignment tab, select Above for
Label Position. On the Font tab, apply any desired formatting to the label's font.
Repeat for the Min series, except select Below for Label Position on the Alignment
tab.
These custom labels and markers adjust when the data changes, and if there are
multiple points that have the same Max and Min values, each point will share the
custom formatting.

An alternative symbol (a large unfilled circle) and label indicates extreme points by
encircling them.
A variation on this technique (Use an Arrow to Indicate Special Points) uses custom
markers to point an arrow at the extreme points.

Use an Arrow to Indicate


Special Points.
People often want to use an arrow or other symbol to indicate a point in a chart. If
you draw an arrow, or any AutoShape, in a chart, it is not in any way tied to the
data or to the chart axes, so it will not move to keep up with a point as the axes
change or the chart resizes. Even if the chart does not change, an AutoShape is not
guaranteed to be in exactly the same position the next time the file is opened. This
technique shows how to attach an indicator (arrow) to a point by creating custom
markers (see Custom Chart Series Markers) for the Min and Max series.

This example is based on the Special Format for Minimum and Maximum example.
Start with the last chart in the Min/Max example, using small square markers, no
lines, and no labels for the Min and Max series.
Make arrows of the size and format that you need, and circles of twice that size.
The shapes will be aligned (and grouped) so that the point of the arrow will be in
the center of the circle, and therefore centered on the point. In this example, the
green and red arrows are one row tall, and the circle two rows in diameter.

The floating command bar is the Align or Distribute tear-away menu from the
Drawing toolbar. The first step is to select the shapes.

Align the shapes using the Align Center button on the menu.

Select just the circles, and hide them by changing their formats to No Line and No
Fill.
Select the green arrow and the corresponding circle, and group the shapes. Select
the red arrow and its circle, and group them.

Copy the grouped shape with the green arrow, then select the Max series in the
chart, and use Ctrl+V or Paste from the Edit menu, and the series will use the
copied shape as the custom marker for the series.

Note: If you select a series before pasting the shape, the entire series takes on the
shape as its markers. If you select just a point, only that point will use the shape.

Copy the grouped shape with the red arrow, then select the Min series in the chart,
and paste, to apply the copied shape to the series.
The purpose of the circle is further illustrated in the chart below. The circle used to
make the custom markers now has a faint outline, so you can see how each entire
marker is centered on its point, even though the arrows are offset.

The arrows are ineffective as legend keys, because the arrow/circle shape is shrunk
to fit in the space of the original marker. Remove each legend entry from the
legend by clicking once to select the legend, then clicking again to select the
individual legend entry, and pressing Delete (click to select the text label, not the
marker, or you will delete the entire series).

As with the data labels in the earlier example, if the data changes, the markers still
highlight the maximum and minimum points.
 

Read more:
http://peltiertech.com/Excel/Charts/PointAtPoints.html#ixzz0Zwb9SXOw

Read more:
http://peltiertech.com/Excel/Charts/FormatMinMax.html#ixzz0Zway38RC

También podría gustarte