Public Sub ChartScale()
With ActiveChart.Axes(xlValue)
.MinimumScale = Range("A1")
.MaximumScale = Range("A2")
End With
End Sub
nancyo said:I tried a search, but cannot get this to work today.
Is there a way to change the format of an axis in a chart by referencing a specific cell?
By this, can the MAX or MIN on the scale be referenced to a specific cell?
Book1 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | |||
1 | X | Y | Min | 2.8 | ||||||||
2 | 1 | 17 | Max | 7.8 | ||||||||
3 | 2 | 12 | ||||||||||
4 | 3 | 7 | 3 | |||||||||
5 | 4 | 22 | ||||||||||
6 | 5 | 8 | ||||||||||
7 | 6 | 6 | ||||||||||
8 | 7 | 8 | ||||||||||
9 | 8 | 6 | ||||||||||
10 | 9 | 9 | ||||||||||
11 | 10 | 20 | ||||||||||
12 | ||||||||||||
Sheet1 |