+ Reply to Thread
Results 1 to 8 of 8

Column Chart - color based on x value

  1. #1
    Registered User
    Join Date
    03-08-2007
    Posts
    4

    Column Chart - color based on x value

    Hello, I have a table similar to this (attachment - 2 columns and 12 rows).

    Here I want to plot A on x axis and B on y axis using column chart. The columns color should be based on the x value (4 unique colors for 4 unique values - P/Q/R/S). How can I do this? I have hundreds of such rows.

    Thanks
    Attached Files Attached Files

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

    Re: Column Chart - color based on x value

    Hi,

    it's all about the data layout.

    Like this, maybe? See attached

    hth
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    03-08-2007
    Posts
    4

    Re: Column Chart - color based on x value

    Thanks for help. I want the graph look like this, but I want to -

    1. Do it without making another table specifying values of P, Q, R and S
    2. Would like to have P, Q, R and S written on x axis

    Can you help?

    Thanks.

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

    Re: Column Chart - color based on x value

    Well, then the only way I can see is to create a simple column chart and manually select the color for each data point.

    Every other solution will involve the creation of another table to hold the data, unless you find a VBA wiz to write a macro for you.

    Data layout is an essential part of chart creation. I've solved your second requirement in the attached file, where you can see that each data label now has its own color. It's like conditional formatting for charts, but you need a helper table to achieve it. (the helper table could be on a different sheet, of course!)

    See what you can do with that.

    cheers
    Last edited by teylyn; 11-19-2009 at 07:08 AM. Reason: typo. nitpick

  5. #5
    Registered User
    Join Date
    03-08-2007
    Posts
    4

    Re: Column Chart - color based on x value

    Many thanks Teylyn.

  6. #6
    Registered User
    Join Date
    10-05-2010
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Column Chart - color based on x value

    Unfortunately this data layout is not in a format in which I can extract data. The attached sheet shows time data (in seconds of a day) for a number of julian days which are separated by a value which I want to become that particular bar color, of which there will only be three in total (Red=1, Yellow=2, and Green=3). Included within the sheet is a Chart1 tab... I welcome all suggestions!
    Attached Files Attached Files

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Column Chart - color based on x value

    Peter,

    Welcome to the Forum, unfortunately:

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  8. #8
    Registered User
    Join Date
    10-05-2010
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Column Chart - color based on x value

    NP... many other forums berate posters for NOT searching other threads for similar information or solutions. I didn't want to start a new one since this was related and wasn't too long. Alas, I'll post a new thread with my question. Thank you for your comments.

+ 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