Set Min and Max Axis in a Line Graph

trainer75

New Member
Joined
Jun 11, 2015
Messages
33
Hi,
wonder if anyone could assist, I have created numerous data sets that with be selected by a drop down box and would like to present a line graph, but the as with the variable I would like the graph to automatically adjust the min and max axis so it looks cleaner and easier to read.

I have created 2 cells, one with the MIN value from the range and the other with the MAX value from the range (these change when selecting different data from drop down box) and would like the axis to reference these.

is this do-able?

Thank you in advance

Regards,
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
You can use the following as a basis on how to set the min and max:
VBA Code:
    ActiveChart.Axes(xlCategory).MinimumScale = 0.5
    ActiveChart.Axes(xlCategory).MaximumScale = 5.8

Substitute the values above with the relevant cell values .

Let me know if you need more help on this.
in that case please post the code you have so far to set the graphs and an image of the data sheet
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,246
Members
452,623
Latest member
cliftonhandyman

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top