Excel: Interactive Chart
PDF version
Instead of creating multiple Excel charts that give different views of data, why not create an interactive chart so users can decide what data they want to see? For example, you have a bar chart that shows last year's sales by month. Some users may only be interested in fourth quarter sales, while others would like a graph of the last half of the year. Follow these steps to let users create the charts they need by scrolling through the data:
- Create a bar chart of the 12-month data.
- Go to Insert | Name | Define.
- Enter NumMonths in the Names In Workbook text box.
- In the Refers To text box enter =$D$1.
- Click Add.
- Enter Months in the Names In Workbook text box.
- In the Refers To text box enter
=OFFSET(Sheet1!$A$2,0,0,NumMonths,1) - Click Add.
- Enter Sales in the Names In Workbook text box.
- In the Refers To text box enter
=OFFSET(Sheet1!$B$2,0,0,NumMonths,1) - Click Add and then OK.
- Select the chart.
- Go to Chart | Source Data.
- Click the Series tab.
- Click in the Values box and enter =Sheet1!Sales.
- Click in the Category (x) Axis Labels box and enter =Sheet1!Months.
- Click OK.
- Go to View | Toolbars | Forms.
- Select the chart.
- Click the Scroll Bar control on the Forms toolbar.
- Click and drag within the chart to draw the Scroll Bar.
- Right-click the Scroll Bar and select Format Control.
- Under the Control tab, enter 1 in the Minimum Value field.
- In the Maximum Value field, enter 12.
- In the Incremental Change field, enter 1.
- In the Cell link field, enter NumMonths.
- Click OK.
The months displayed will adjust automatically to coincide with the position of the slider on the Scroll Bar.
Source:
http://articles.techrepublic.com.com/5100-10877_11-6176464.html?tag=nl.e056