Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How do you return the Max and Min value of a series on a chart? Assume there there is only 1 series plotted across a time variable
The logical way is to calc this from the source data, however I want to o it this way as I have a number of graphs in an array where I want to set the MinimumScale and MaximumScale property based on the points in the chart. The source data is not the same for each worksheet Regards Joe |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Joe,
Try this code, watch the text wrapping. Sub x() MsgBox GetChartMax(ActiveChart, 1) MsgBox GetChartMin(ActiveChart, 1) End Sub Function GetChartMax(MyChart As Chart, SeriesIndex As Integer) As Double GetChartMax = Application.WorksheetFunction.Max(MyChart.SeriesCo llection(SeriesIndex).Values) End Function Function GetChartMin(MyChart As Chart, SeriesIndex As Integer) As Double GetChartMin = Application.WorksheetFunction.Min(MyChart.SeriesCo llection(SeriesIndex).Values) End Function Cheers Andy Joe wrote: How do you return the Max and Min value of a series on a chart? Assume there there is only 1 series plotted across a time variable. The logical way is to calc this from the source data, however I want to o it this way as I have a number of graphs in an array where I want to set the MinimumScale and MaximumScale property based on the points in the chart. The source data is not the same for each worksheet. Regards, Joe -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
excel chart maximum series should more than 255 series | Charts and Charting in Excel | |||
User Selectable Series and Number of Series for Line Chart | Charts and Charting in Excel | |||
how to plot column chart with one series against multiple series. | Charts and Charting in Excel | |||
chart data series -- plot a table as a single series | Charts and Charting in Excel | |||
Can I add an average series to a chart with 2 or more series? | Charts and Charting in Excel |