Closed Thread
Results 1 to 12 of 12

Bar Graph Color Selection for negatives

  1. #1
    Registered User
    Join Date
    01-03-2010
    Location
    North Carolina
    MS-Off Ver
    Excel 2007
    Posts
    12

    Bar Graph Color Selection for negatives

    I have an EXCEL bargraph that I would like to automatically show a green bar if the number is positive and a red bar if the number is negative. Just using the inverse color if negative does not give me the option of selecting the color. Is it possible to do what I am asking automatically, or must I manually set the color every time the value changes sign?

    Thanks
    Attached Files Attached Files
    Last edited by chadwellp; 03-24-2010 at 09:47 PM. Reason: Added file example

  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: Bar Graph Help

    Hi chadwell,

    this can be arranged automatically with careful placement of the source data. Post a sample file as a starting point.

  3. #3
    Registered User
    Join Date
    01-03-2010
    Location
    North Carolina
    MS-Off Ver
    Excel 2007
    Posts
    12

    Bar Graph Color Selection for negatives

    I have a bargraph that needs to graph green bars for positive numbers and red bars for negative numbers automatically. I can manually change a bars color, but would rather it change automatically if possible. Using inverse for negative numbers, changes the color, but does not let me select what color I want. Is it possible to do what I am wanting to be automatic? Thanks

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Bar Graph Color Selection for negatives

    Plot two series, positive values in one, and negative in the either.

    Use formulas to compute the plotted series values from the single-series data.
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Bar Graph Color Selection for negatives

    Thread merged.

    chadwellp, please take a few minutes to read the forum rules before posting again.

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434

    Re: Bar Graph Color Selection for negatives

    In xl2003 you could set the invert colour using this approach.
    http://www.andypope.info/charts/Invertneg.htm

    But in xl2007 this does not work. As the other have suggested you need to use 2 series, with the overlap set to 100%. And control the values outputted for each data point within each series by using formula to plot positive and negative values.
    Cheers
    Andy
    www.andypope.info

  7. #7
    Registered User
    Join Date
    01-03-2010
    Location
    North Carolina
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Bar Graph Help

    Thanks for the reply. I have attached an example.

  8. #8
    Registered User
    Join Date
    01-03-2010
    Location
    North Carolina
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Bar Graph Color Selection for negatives

    Sorry about that. I tried to find my original post last night and could not find it. I figured I must have done something wrong and the thread did not post.

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

    Re: Bar Graph Color Selection for negatives

    See attached. The right hand chart is plotted from the values in columns D and E. Two data series, one green, one red. Overlap set to 100%.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    01-03-2010
    Location
    North Carolina
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Bar Graph Color Selection for negatives

    Thanks a bunch.

  11. #11
    Registered User
    Join Date
    08-02-2011
    Location
    muscat, oman
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Bar Graph Color Selection for negatives

    Hi,
    I have also been able to do it. Further, I want to add data labels into it. But the problem i am facing is that, it is showing two data labels for every item, one which is the actual number and the other is 0.00 if i put "" and it shows it shows NA# "0.00" if i put NA() than, is there a solution that it shows data labels only for the non-zero numbers or numbers which are atually from our data series.

    please reply

  12. #12
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Bar Graph Color Selection for negatives

    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.

Closed 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