# Microsoft Office Application Help - Excel Help forum > Excel Charting & Pivots >  > [SOLVED] X-axis in months?

## Peter

How do I get the x-axis on a graph to display the text Jan-Dec rather than
the numbers 1-12?

----------


## Andy Pope

Hi Peter,

Create you xy scatter chart. Use the source data dialog to add another
data series. The data series requires 12 values.
Select the new series and move to the secondary axis. Now change its
chart type to column. Use the source data dialog again to specify the
category label range. Remove the tick labels from the main x axis.
Use Chart options to display the secondary x axis. You should now have
the month names at the top of the chart.
Double click secondary xaxis and check on the scale tab, Value (Y) axis
crosses between categories. Double click secondary yaxis and on the
scale tab uncheck Category(X) axis crosses at maximum value.
You can now delete the secondary yaxis. Format the columns to have no
border and fill.

Or you could use a dummy data series to create you own xaxis labels.
See Jon's examples of arbitrary axis scales to get an idea.
http://peltiertech.com/Excel/Charts/axes.html#ArbAxis

Cheers
Andy





Peter wrote:
> How do I get the x-axis on a graph to display the text Jan-Dec rather than
> the numbers 1-12?

--

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

----------


## ajones@hjones.plus.com

If you put the months in your spreadsheet as dates e.g. 1/1/05, 1/2/05,
1/3/05, etc and format them using custom format as mmm then they will
display as Jan, Feb, etc but the underlying data will be numeric.  You
can now create an XY scatter graph and format the x-axis using the
Custom number format and mmm.  You will have to fiddle around with the
scale section to get the display to start at Jan and end at Dec e.g.
enter 38353 to start at Jan 2005 and 38718 to end at Dec 05, and set
the major and minor tick marks to be 30 apart so you get a label for
every month.

Andrea Jones
www.stratatraining.co.uk

Peter wrote:
> How do I get the x-axis on a graph to display the text Jan-Dec rather
than
> the numbers 1-12?

----------


## Jon Peltier

Andrea -

FYI, on the Scale tab of the Format Axis dialog, you can simply enter
the value you want in Date format (Time format works too), and Excel
will convert it for you. If you enter 1/1/2005, Excel will convert it to
38353.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

ajones@hjones.plus.com wrote:

> If you put the months in your spreadsheet as dates e.g. 1/1/05, 1/2/05,
> 1/3/05, etc and format them using custom format as mmm then they will
> display as Jan, Feb, etc but the underlying data will be numeric.  You
> can now create an XY scatter graph and format the x-axis using the
> Custom number format and mmm.  You will have to fiddle around with the
> scale section to get the display to start at Jan and end at Dec e.g.
> enter 38353 to start at Jan 2005 and 38718 to end at Dec 05, and set
> the major and minor tick marks to be 30 apart so you get a label for
> every month.
>
> Andrea Jones
> www.stratatraining.co.uk
>
> Peter wrote:
>
>>How do I get the x-axis on a graph to display the text Jan-Dec rather
>
> than
>
>>the numbers 1-12?
>
>

----------

