Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.charting
|
|||
|
|||
Crossing Axis Values
Hi everyone
I have a chart where the values can be modified depending on some filters What I need is that the values where the axis crosses change automatically as well depending on the value of one cell for the X axis and another cell for the Y axis Instead of manually modify the values is this posible?? |
#2
Posted to microsoft.public.excel.charting
|
|||
|
|||
Crossing Axis Values
You'd need to do this using VBA. An example code that could be run with the
chart selected: Sub ChartAxis() With ActiveChart 'This is the y-axis .Axes(xlCategory).CrossesAt = Range("A2").Value 'This is the x-axis .Axes(xlValue).CrossesAt = Range("A3").Value End With End Sub Depending on whether your chart is on a seperate sheet or not, you could automate this using either a Chart_Activate event, or a Worksheet_Change event. -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "Alonso" wrote: Hi everyone I have a chart where the values can be modified depending on some filters What I need is that the values where the axis crosses change automatically as well depending on the value of one cell for the X axis and another cell for the Y axis Instead of manually modify the values is this posible?? |
#3
Posted to microsoft.public.excel.charting
|
|||
|
|||
Crossing Axis Values
Thanks Luke
I guess the same goes for the max and min values for each axis, right?? could you provide the VBA for this?? and have all in one button so after the filters are used use the button and update the XY chart?? "Luke M" wrote: You'd need to do this using VBA. An example code that could be run with the chart selected: Sub ChartAxis() With ActiveChart 'This is the y-axis .Axes(xlCategory).CrossesAt = Range("A2").Value 'This is the x-axis .Axes(xlValue).CrossesAt = Range("A3").Value End With End Sub Depending on whether your chart is on a seperate sheet or not, you could automate this using either a Chart_Activate event, or a Worksheet_Change event. -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "Alonso" wrote: Hi everyone I have a chart where the values can be modified depending on some filters What I need is that the values where the axis crosses change automatically as well depending on the value of one cell for the X axis and another cell for the Y axis Instead of manually modify the values is this posible?? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Secondary Axis not crossing at zero | Charts and Charting in Excel | |||
Data labels along below x axis when y axis has negative values | Charts and Charting in Excel | |||
2-axis problem with horizontal crossing | Charts and Charting in Excel | |||
How to insert X axis scale values next to axis and X axis grid lin | Charts and Charting in Excel | |||
Hiding Values Below Z Axis Minimum Value on Axis Charts | Charts and Charting in Excel |