tags:

views:

194

answers:

1

I would like to know how to programmatically find and the Y axis maximum of an excel chart when there is more than one available.

My end goal is to find the max y-axis values, compare them, and set them both to the greater of the two.

+2  A: 

VBA similar to this will retrieve scale value

    With ActiveChart.Axes(xlValue, xlPrimary)
        ActiveSheet.Range("A1").Value = .MaximumScale
    End With

For more detail on how to link chart axis scale parameters to values in cells check out

http://peltiertech.com/Excel/Charts/AxisScaleLinkToSheet.html#ixzz0r8qN248l

Cama
Thanks Cama !!!
Soo