Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

Automaticaly change line chart range



My question: is there a way, in a macro to change the range of a line chart.  Let's say, the last sale of the stock is 75 The range of the chart is 60 to 90.  If the price of the stock went to 85 the macro would change the range to 70-100.  The macro would change  both sides of the range  by a predetermined amount, let's say 15 points.   If it went to 95 the range would change to 80 -110.  Conversely if the stock was at 75 and it went to 65 the chart would change to 50-80.    I have no idea it this would actually work, but I have to ask.

Thank you,

Paul Gaconnier

If you would like to look at my charts go to stocktrac.net



I know preciously little about charts but your question interests me because of its background. For me to study your question I would need to see which kind of chart you use (in Excel, not HTML) and how you set the range. If you don't receive a proper answer to your question and would like me to immerse myself in the problem please post the workbok in whcih you would like to have the automation.
Variatus (rep: 4879) Sep 21, '18 at 5:34 am
Add to Discussion

Answer the Question

You must create an account to use the forum. Create an Account or Login