+ Reply to Thread
Results 1 to 4 of 4

Cannot Format X-Axis as Dates

  1. #1
    Registered User
    Join Date
    09-30-2018
    Location
    Texas
    MS-Off Ver
    2010, 2016
    Posts
    2

    Exclamation Cannot Format X-Axis as Dates

    I am trying to plot oil prices vs. date in Excel 2010. I cannot get the x-axis to format as "Date" per the Microsoft Help instructions.

    I found an old thread regarding this problem (Excel Help Page Doesn't Match Excel (Date Category Axis Base Unit)), and I downloaded the workbooks there but cannot figure out how my data is different from the "solution" data. That is, I believe my data is formatted as a date (rather than text) but I still don't have the option to format the x-axis as a date. This is driving me nuts. I just want to set this up so my min is 1/1/2011 and my max is 1/1/2017, with major units in years. Due to leap years in that data range, setting major units to 365 or even 365.25 does not solve my problem.

    TIA for help. I need to figure this out ASAP.
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by locura79; 09-30-2018 at 07:08 PM. Reason: added attachments

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Cannot Format X-Axis as Dates

    You are using 2 different ranges for the X-value, looks like excel is trying to use dates where they match.
    WTI='Oil Prices'!$E$3:$E$75
    WCS='Oil Prices'!$A$3:$A$75

    Try just using 1 range for the date
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,826

    Re: Cannot Format X-Axis as Dates

    When I open your sample file, I note that your chart type is XY scatter. XY scatter charts do not offer the "date" axis with date axis formatting options. The x axis in an XY scatter chart is a plain old value axis.

    In order to get a date axis in your file, I:
    1) Change chart type to Line.
    2) Format axis as date axis (if Excel does not do so automatically) and set Major unit to 1 year.

    At this point, I did notice that Excel still seems to plot the second data series against the first data series's dates, where the actual data shows the one data set should plot against the 15th of the month and the other the first of the month. If it is important for the data to plot against the correct x values, you may need to do as Ford suggests and combine the x values ranges into a single range. Or maybe plot one data series against the secondary axis system and format those axes to be the same as the primary axis system. In my experience, line charts don't always do well with data series that have different x values for the data (which is probably why you were using an XY scatter chart in the first place). You may need to choose which imperfection you would prefer to deal with -- having an XY scatter chart which easily copes with different x values, but does not offer a nice date axis, or a line chart which offers a nice date format, but does not work as well with different x values.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  4. #4
    Registered User
    Join Date
    09-30-2018
    Location
    Texas
    MS-Off Ver
    2010, 2016
    Posts
    2

    Re: Cannot Format X-Axis as Dates

    Thank you so much! I'm incredibly frustrated but grateful that the solution was so easy.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 06-22-2017, 06:16 PM
  2. Replies: 9
    Last Post: 09-22-2015, 02:43 AM
  3. Replies: 2
    Last Post: 07-14-2014, 11:11 AM
  4. Charts: Format Axis -> Axis Options -> Fixed minimum and maximum
    By johnmata in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 08-28-2013, 05:53 PM
  5. [SOLVED] Format of dates on x-axis of charts
    By Melvinrobb in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 06-20-2012, 08:59 AM
  6. line chart-format x axis for dates
    By Scatter in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 11-29-2011, 04:59 AM
  7. Excel 2007 : Format x-axis from dates into fiscal quarters
    By teddybouch in forum Excel General
    Replies: 3
    Last Post: 11-05-2010, 11:15 AM

Tags for this Thread

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