+ Reply to Thread
Results 1 to 14 of 14

Excel 2007 : Adding dates to horizontal axis

  1. #1
    Registered User
    Join Date
    02-16-2010
    Location
    New York, New York
    MS-Off Ver
    Excel 2007
    Posts
    7

    Adding dates to horizontal axis

    Hi,

    I'm trying to graph dates (5/14/2009 etc) on the x-axis and dissolved oxygen levels on the y-axis. I can't seem to figure out how to add the exact dates in my data to the horizontal axis in Excel 2007. Dates are displayed on the x-axis, but their not the dates in my data. Their close to the dates in the data, but not the exact dates. Is there any way to get the horizontal axis to display the exact dates in the data?

    Thank for any help in advance.
    Last edited by ExcelH; 02-24-2010 at 10:56 AM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,613

    Re: Adding dates to horizontal axis

    Are you using a scatter chart?
    Ben Van Johnson

  3. #3
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Adding dates to horizontal axis

    Good point, Ben.

    ExcelH, if you want the exact dates, you need to use a line chart or column chart, which will take the dates as individual categories. For a line chart you will need to select to chart the X axis as categories.

    An XY scatter chart will space the data points on a time line with appropriate spaces between the data items, so that Feb-1 and Feb2 are closer together than Feb-2 and Apr-1.

    With a category axis, you will get these three dates in evenly spaced segments.

  4. #4
    Registered User
    Join Date
    02-16-2010
    Location
    New York, New York
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Adding dates to horizontal axis

    At first I was using an XY scatter, then I changed to a line. When I changed to a line graph I could set the date it started at, but the rest of the dates still do not correspond to my data. How do I chart the X-axis as categories?

    Thanks!

  5. #5
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Adding dates to horizontal axis

    Click the chart, then go Chart - Chart Options - Axes tab and set the X axis to Category.

  6. #6
    Registered User
    Join Date
    02-16-2010
    Location
    New York, New York
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Adding dates to horizontal axis

    Teyln,

    I'm using Excel 2007 and I don't see Chart - Chart Options - Axes tab and set the X axis to Category. When I click on the x-axis and click on Layout under "Chart Tools" and look at "Current Selection" Horizontal Category Axis is selected. So it must already be a category axis. Is there some other setting I could check?

  7. #7
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Adding dates to horizontal axis

    ExcelH, you've just registered for this forum and were asked to state your Excel version. This question is asked for a reason. It helps us not to send you off on a wild goose chase for things that differ between versions. So, if you normally use XL03 and only this post was about XL07, you could have pointed that out.

    Or, if you use XL07 per default, please adjust your profile.

    In Excel 2007 open the format Axis dialog for the X axis and select Axis Type = Text axis

    hth

  8. #8
    Registered User
    Join Date
    02-16-2010
    Location
    New York, New York
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Adding dates to horizontal axis

    Teylyn,

    I thought I added Excel 07 when I registered, but I will check that. In my first post I also said I was working in Excel 07. I apologize for the confusion. I didn't realize it.

  9. #9
    Registered User
    Join Date
    02-16-2010
    Location
    New York, New York
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Adding dates to horizontal axis

    I change my profile, I didn't even realize it said 03 in my information. My apologies again.

    I changed the horizontal axis to text and it bunched all the dates to left where the x and y axis meet. I tried to get them to span out across the axis and coincide with the tick marks, but I didn't find anything that worked.

    Thanks for all your help.

  10. #10
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Adding dates to horizontal axis

    can you post the file?

  11. #11
    Registered User
    Join Date
    02-16-2010
    Location
    New York, New York
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Adding dates to horizontal axis

    Yes, please see attached.
    Attached Files Attached Files

  12. #12
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Adding dates to horizontal axis

    Set the Axis to Text axis and below that, make sure that Vertical axis crosses at: is set to automatic. That should do the trick. See attached
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    02-16-2010
    Location
    New York, New York
    MS-Off Ver
    Excel 2007
    Posts
    7

    Thumbs up Re: Adding dates to horizontal axis

    Teylyn,

    I can't thank you enough. It's finally working.

    I noticed some posts have a solved next to it? Do I add that?

  14. #14
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Adding dates to horizontal axis

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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