Thanks, your linked script worked for me. Here's what I ended up with, which is idiosyncratic to my application but perhaps useful as an example for others:
What this does:- Selects the active worksheet
- Selects the first chart on the active worksheet
- Selects the data source for the chart, starting on row 48, continuing until the last row that has data, using columns A-C
- Moves the chart to the top left position on the active worksheet
- Sets the X-axis range on the chart to match the range of values in column A (row 48 through the last row)
- Sets the Y-axis range on the chart to match the range of values in column B (row 48 through the last row)
- Rounds the Y-axis values down by 5 for the minimum and up by 5 for the maximum
- Sets the worksheet zoom level to 86
Then I added a hotkey and a quick access icon to invoke this macro.
Bookmarks