+ Reply to Thread
Results 1 to 5 of 5

Need chart help with changing x values

  1. #1
    Registered User
    Join Date
    11-18-2010
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    41

    Need chart help with changing x values

    Hi, I have attached an excel file in which I have 4 data sets with morning and night shift values. I have created a chart that graphs the data, and I have check boxes that enable me to display and not display each data set at my leisure. The problem I am having is when I change the shift from Day to Night, the x axis does not change the way I want it to. It shows the night data fine while the day data is all bunched together. Does anyone know how I can get it so that both night and day data can be graphed with the same x axis range ( but at different times)?

    Any help is much appreciated.
    Graphproblem.xlsm

  2. #2
    Registered User
    Join Date
    11-18-2010
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    41

    Re: Need chart help with changing x values

    Also, I don't necessarily have to have it say AM or PM, if it could just show times between 6:00 and 6:00, that would work for me too.

  3. #3
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Need chart help with changing x values

    Quote Originally Posted by eface2face View Post
    Also, I don't necessarily have to have it say AM or PM, if it could just show times between 6:00 and 6:00, that would work for me too.
    In this case, I think the fastest thing to do would be, subtract 12 from the night data, so they're AM values, move them to their own set of columns, and then change the format of the labels from h:mm:ss AM/PM to just h:mm or something like that.

    Anyway, if you want something like two different sets of x-axis, I don't even know how I'd do that; I hazard to guess what you'll probably end up doing is "spoofing" the x-axis no matter what your solution ultimately is, rather than actually having two different x-axis, one layered over another.

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Need chart help with changing x values

    You could attach a macro to your dropdown box. Something like this
    Please Login or Register  to view this content.
    It sucks that Excel defaults to 12 midnight on your day shift. :-/
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Registered User
    Join Date
    11-18-2010
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    41

    Re: Need chart help with changing x values

    Quote Originally Posted by ChemistB View Post
    You could attach a macro to your dropdown box. Something like this
    Please Login or Register  to view this content.
    It sucks that Excel defaults to 12 midnight on your day shift. :-/
    Your code helped out, I was able to mess around with it and get things the way I wanted. Thank you very much.

+ 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