F
Fan924
From an earlier posting, I am using this to set the range of a chart.
' >>>>> Set Chart Range Value (Y) Axis <<<<<
With ActiveSheet.ChartObjects("Chart 1").Chart.Axes(xlValue)
.MinimumScale = WorksheetFunction.Min(Range("B3:B18"))
.MaximumScale = WorksheetFunction.Max(Range("B3:B18"))
End With
' >>>>> Set Chart Range Value (X) Axis <<<<<
With ActiveSheet.ChartObjects("Chart 1").Chart.Axes(xlCategory)
.MinimumScale = WorksheetFunction.Min(Range("A3:A18"))
.MaximumScale = WorksheetFunction.Max(Range("A3:A18"))
End With
I would also like to read the formatting of the data and apply that to
the chart. It changes often. Excel 97
' >>>>> Set Chart Range Value (Y) Axis <<<<<
With ActiveSheet.ChartObjects("Chart 1").Chart.Axes(xlValue)
.MinimumScale = WorksheetFunction.Min(Range("B3:B18"))
.MaximumScale = WorksheetFunction.Max(Range("B3:B18"))
End With
' >>>>> Set Chart Range Value (X) Axis <<<<<
With ActiveSheet.ChartObjects("Chart 1").Chart.Axes(xlCategory)
.MinimumScale = WorksheetFunction.Min(Range("A3:A18"))
.MaximumScale = WorksheetFunction.Max(Range("A3:A18"))
End With
I would also like to read the formatting of the data and apply that to
the chart. It changes often. Excel 97