Find minimum value of a chart series

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Find minimum value of a chart series

Post by Rudi »

How do I store the minimum value of a chart series in a variable. TX

eg: MinVal = Application.Min(ActiveChart.SeriesCollection(1).Values)
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.

User avatar
HansV
Administrator
Posts: 78520
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Find minimum value of a chart series

Post by HansV »

It looks like you answered your own question...
Best wishes,
Hans

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: Find minimum value of a chart series

Post by Rudi »

You are right....I could have sworn it did NOT work when I posted it!!!! I think I did not have the chart selected...thats why!
I added code to check for this event!

TX again!
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.

Jon_Peltier
Microsoft MVP
Posts: 3
Joined: 23 Sep 2011, 15:41

Re: Find minimum value of a chart series

Post by Jon_Peltier »

Sometimes I have seen the one line command fail, so I generally do this:

Dim vValues As Variant
vValues = ActiveChart.SeriesCollection(1).Values
MinVal = Application.Min(vValues)

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: Find minimum value of a chart series

Post by Rudi »

Thanks for your valued input Jon. Appreciate it (and your website - which I reference often for charting tips and info.)
Cheers
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.