+ Reply to Thread
Results 1 to 5 of 5

X Axis not charting properly

  1. #1
    Registered User
    Join Date
    12-11-2012
    Location
    cincinnati, ohio
    MS-Off Ver
    Excel 2010
    Posts
    43

    X Axis not charting properly

    Hello All,

    I have a macro that charts data for me. Everything about the macro works with 1 exception: I want to redesignate the x-axis labels. The macro does do this but it doesn't do it right. In some cases it frame shifts the categories, in others it labels a category completely wrong. I have attached a sample workbook to better illustrate what I am saying. The charts are on the sample tab, the "Charts" tab is included in case you'd like to run the macro yourself. The macro is supposed to chart the data by product ID (one chart per product ID) and then change the x-axis category to the label in column F on "Chart Data."

    Thanks, in advance, for your help.

    Sample Data4.xlsm

    Below is the part of the macro that creates the charts and subsequently changes the x axis:

    Please Login or Register  to view this content.
    Last edited by rodrignj; 02-21-2013 at 11:03 AM.

  2. #2
    Registered User
    Join Date
    12-11-2012
    Location
    cincinnati, ohio
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: X Axis not charting properly

    Hello everyone,

    I have figured out why the x-axis isn't plotting correctly, I am not just having trouble determining how to fix this. What is happening is: for every product code, it resets the x-axis starting at F1 (I don't understand why it starts at F1, since I have designated F2 as the starting position), and then uses as many rows, in column F, as there are data sets for each product ID. So, for RAND RD002, there are 8 data sets, so it uses F1:F8; likewise there are 12 data sets for RAND RD003 so it uses F1:F12. Any help and/or insight you might be able to offer is greatly appreciated.

    Thanks.

  3. #3
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: X Axis not charting properly

    Try:
    Please Login or Register  to view this content.
    Remember what the dormouse said
    Feed your head

  4. #4
    Registered User
    Join Date
    12-11-2012
    Location
    cincinnati, ohio
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: X Axis not charting properly

    This worked perfectly! Thank you so much!

  5. #5
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: X Axis not charting properly

    You're welcome

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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