+ Reply to Thread
Results 1 to 7 of 7

Blank if zero

  1. #1
    Registered User
    Join Date
    03-04-2009
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    3

    Blank if zero

    HI guys, i have a 3 part question.


    1) I've created a bargraph that has both positive and negative values. However, the graph visually has a bar(small albeit) for zero values. I want to get rid of this...which leads to part 2.

    2) I figured I would do this by creating an IF statement like the one below

    =IF(A9=0," ",A9)

    The problem is that A9 is a percentage, and this formula does not seem to work when it is in this formatting.


    3) Lastly, for the graph itself, how would I automate colors to negative and positve values? For example, whenever the graph has a positive value it will be colored Green..negative Red. Would I have to manually change the colors whenever I change the data?
    Last edited by Andiroou; 03-04-2009 at 01:34 PM.

  2. #2
    Registered User
    Join Date
    10-22-2008
    Location
    United States
    Posts
    16

    Re: Blank if zero

    try replacing your formula with:

    =IF(A9=0,NA(),A9)

  3. #3
    Registered User
    Join Date
    03-04-2009
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Blank if zero

    i figured out why the if statement didn't work.

    A9 was the Difference of two other percentages, the percentages in those cells were rounded off to the nearest whole number. Therefore when A9 showed 0%, it was infact like .00025%

    I used ROUND to fix this.



    Now if anyone can help me with #3.

    Thanks

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Blank if zero

    not that i really know this stuff but look here
    http://www.peltiertech.com/Excel/Cha...nalChart1.html
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Blank if zero

    You can divide data into two columns >0 and <0 and draw two graphs in same chart

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Blank if zero

    ok based on that link i posted here's an example
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    03-04-2009
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Blank if zero

    awesome guys.. thanks a million.

    Conditional charting is quite nifty.

+ 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