Excel – Set automatic axis limits for bar chart without defaulting to zero

chartsmicrosoft excel

I am building a bar chart in Excel with data values ranging from, e.g., 10 to 20. I want the x-axis limits to be automatic, but although the right limit (near 20) works correctly, the left limit always defaults to 0.

I'd like the left limit to be near 10, instead of zero, without having to have the limit fixed. Is there any way to do this?

Best Answer

I know this thread is old but, recent users may find it useful to know that it is possible to adjust the minimum scale with a Macro.

Just create a macro with the following code:

Sub adjustscales()

Sheet1.ChartObjects("Chart 1").Chart.Axes(xlValue).MinimumScale = Sheet1.Range("A1")

Sheet1.ChartObjects("Chart 1").Chart.Axes(xlValue).MaximumScale = Sheet1.Range("A2")

End Sub

And of course create a formula on A1 and A2 to be the =MIN(data) and =MAX(data).