The macro recorder is giving the same code for adding the title for the X and Y axis. On the Y-axis I want 'Age' and on the X-axis 'Year', but after going through the recorder it gives this:
ActiveChart.Axes(xlValue, xlPrimary).AxisTitle.Text = "Age"
ActiveChart.Axes(xlValue, xlPrimary).AxisTitle.Text = "Year"
When the program is run, there is nothing in the X-axis title, and 'Year' in the Y-axis. How do I diversity the codes so that the correct title goes to the correct axis?
~G.
Chat with our AI personalities
Each axis is a line on a chart that together define its structure and which the data plotted on the graph is measured against. The Y axis is the vertical access, in other words the one that goes up and down. The X access is horizontal and so it goes across a chart. The Y axis is sometimes known as the value axis. Having an axis is common on scatter diagrams or X-Y Charts, bar charts and others. You do not have one on a pie chart.
It is the title for the X axis, which is the one going across at the bottom of a chart. To explain what the data means, you can put a title on it.