MS Excel macro for quickly zooming and panning a line chart
- Click and download ChartSampleWithQuickZoom.xlsm
- Add your own data
- Create new line chart(s) on analysis sheet
- Scroll/Pan as needed
- Copy/paste chart to new location.
- Create a new Excel spreadsheet
- Import the ChartMacro.vb source code
- Create the following Names in Name Manger under Formulas and assign each to a cell
- Scroll_Amount
- Set_Thickness
- Set_X_Start
- Set_X_End
- Zoom_Amount
- Create buttons using the Insert menu under the Developer ribbon and assign to the following macro functions
- Zoom_In
- Zoom_Out
- Left_Scroll
- Right_Scroll
- Go_To_X_Range
- Set_Series_Thickness
- Import data and create charts (same as above)