+ Reply to Thread
Results 1 to 11 of 11

changing x-axis format on chart

  1. #1
    Forum Contributor
    Join Date
    08-17-2009
    Location
    West Midlands
    MS-Off Ver
    Excel 2016
    Posts
    213

    changing x-axis format on chart

    Good morning -

    I have a chart and the x-axis is custom format i.e. Jan-11, Feb-11, Mar-11 etc...

    This chart is copied to another workbook and links broken. I have deselected the 'Linked to Source' box to keep the formatting for the x-axis (before breaking the links).

    However, when I apply a data table the formatting changes to text.

    How can I stop this happening and keep the custom format?

    Any help appreciated!

    Steve
    Last edited by SAsplin; 06-07-2011 at 11:40 AM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: changing x-axis format on chart

    The data table formatting is linked to the cell formatting not the axis, you will need to change the cells number format.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Contributor
    Join Date
    08-17-2009
    Location
    West Midlands
    MS-Off Ver
    Excel 2016
    Posts
    213

    Re: changing x-axis format on chart

    Thanks for the reply.

    The values for the x-axis are retrieved from cells that are in custom format mmm-yy - they're not number format.

    They stay in the custom format even with the data table - but as soon as I break the link it changes the format.

    Steve

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: changing x-axis format on chart

    post example to clarify.

  5. #5
    Forum Contributor
    Join Date
    08-17-2009
    Location
    West Midlands
    MS-Off Ver
    Excel 2016
    Posts
    213

    Re: changing x-axis format on chart

    The chart is to be emailed without the DATA tab. If I copy the graph, deselect the data table to uncheck the 'linked to source and reapply the data table - everything is ok.

    However, once I break the link to the data source they x-axis format changes.

    Example enclosed.
    Attached Files Attached Files

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: changing x-axis format on chart

    How did you get the data table to mask the axis?

    When I create a chart and add a data table the axis and table have their own category labels.

  7. #7
    Forum Contributor
    Join Date
    08-17-2009
    Location
    West Midlands
    MS-Off Ver
    Excel 2016
    Posts
    213

    Re: changing x-axis format on chart

    The x-axis labels run off a dynamic named range. The data table was simply added by checking the 'show data table' box in chart options. As far as I am aware I haven't masked the axis.

  8. #8
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: changing x-axis format on chart

    see the chart I get where both axis and table have category labesl.
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    08-17-2009
    Location
    West Midlands
    MS-Off Ver
    Excel 2016
    Posts
    213

    Re: changing x-axis format on chart

    I see that by changing the primary axis to automatic creates seperate axis.

    However, even if you do this, once you copy the chart to a new workbook and break the links it still converts the axis format to number.

  10. #10
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: changing x-axis format on chart

    Got it, I see the problem now.

    Add this formula to G2 in the source workbook and copy down.

    =TEXT(A2,"mmm-yy")

    Change the chart to use colulmn G for the category labels.

    Now when you move the chart to another workbook and break the links the axis will return the text and not revert to numbers.

  11. #11
    Forum Contributor
    Join Date
    08-17-2009
    Location
    West Midlands
    MS-Off Ver
    Excel 2016
    Posts
    213

    Re: changing x-axis format on chart

    You're a genius!

    That's been bugging me for ages. Allow me to leave you glowing praise.

    Many thanks,

    Steve

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1