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

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
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,213,554
Messages
6,114,280
Members
448,562
Latest member
Flashbond

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