Microsoft Office Tutorials and References
In Depth Information
Specifying the Beginning and Number of Points for a Series
3. Right-click the Spinner and choose Format Control from the shortcut
menu. This displays the Format Control dialog box.
4. In the Format Control dialog box, click the Control tab.
5. In the Minimum value field, enter .
6. In the Maximum value field, enter 25 (or a number that corresponds to
the row that contains the last data point for the chart).
7. In the Cell link field, enter FirstRow . This will link the Spinner control
with cell D2.
8. Click OK to close the dialog box.
9. Repeat Steps 3–8 to add another Spinner for the LastRow cell. In Step 7,
specify LastRow as the Cell link.
After performing these steps, you can use the linked Spinners to quickly adjust
the values that control the first and last data points in the chart.
Specifying the Beginning and
Number of Points for a Series
The example in this section is similar to the previous example. Rather than
enabling the user to specify the first row and last row to be plotted, this example
allows the user to specify the first row (as a meaningful date) and the number of
Figure 7-8 shows a worksheet that contains daily sales information. Cell C2
contains the first date to be plotted, and cell C4 contains the number of data points to
appear in the chart.
This example utilizes two (optional) user interface enhancements: a drop-down
list to select the start day, and a Spinner control to specify the number of days. The
drop-down list (not visible in the figure) is accomplished with Excel’s Data
Creating the chart
Use the data in columns A:B to create a chart. The chart in the figure is a standard
line chart but this technique will work with any chart type.