ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   XY Chart - Vertical Axis Crosses - Cell reference vs. Value (https://www.excelbanter.com/charts-charting-excel/252665-xy-chart-vertical-axis-crosses-cell-reference-vs-value.html)

Joe Dunbar

XY Chart - Vertical Axis Crosses - Cell reference vs. Value
 
I would like to have the Axis Value refer to the result of a formula. My XY
chart is a 4 quadrant view of data points. I want the vertical axis to cross
at the median value for the range. I can enter the number by hand but I
can't use the cell reference.

Thanks,
Joe

Andy Pope

XY Chart - Vertical Axis Crosses - Cell reference vs. Value
 
Hi,

You will have to solve this with some VBA code.
This example is for Scales min/max value but the principle is the same.
http://peltiertech.com/Excel/Charts/...nkToSheet.html

This is the code for setting the corresat value.

With ActiveChart.Axes(xlCategory)
.Crosses = xlCustom
.CrossesAt = 2.5
End With


Cheers
Andy

Joe Dunbar wrote:
I would like to have the Axis Value refer to the result of a formula. My XY
chart is a 4 quadrant view of data points. I want the vertical axis to cross
at the median value for the range. I can enter the number by hand but I
can't use the cell reference.

Thanks,
Joe


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info


All times are GMT +1. The time now is 03:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com