+ Reply to Thread
Results 1 to 4 of 4

IF statement in Bar Chart Data Range

  1. #1
    Registered User
    Join Date
    04-07-2008
    Posts
    3

    IF statement in Bar Chart Data Range

    In the source data for a bar chart, I would like to make it so that a series will not appear if its value is 0. So, I tried to put the following as the data range for the bar chart...

    =(IF('Sheet1'!Y28=0," ",'Sheet1'!V28:Y28)), (IF('Sheet1'!Y29=0," ",'Sheet1'!V29:Y29))

    And I would continue in this way to cover all of the rows of data in the chart. But, it says "reference is not valid", obviously referring to the " " in the true condition of the IF statement. Is there something I can put here to make the data range skip over a row of data if the condition is true, or do you have another suggestion for this? Thanks!

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    I think if you make it return the #N/A error with NA(), then it should skip those rows.

    Note: Your value if False are ranges... I am not sure that makes sense...
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    04-07-2008
    Posts
    3
    Putting the formula directly in the data range property of the chart doesn't seem to work, so I also tried your suggestion of putting the formula directly in the fields so that they would show #N/A in the fields, but the chart does not skip over them. The attached image illustrates what I am talking about. I want the bars that do not have any values to not show in the graph, and you can see how I tried the #N/A approach with one of the rows. Thanks for your help!!

  4. #4
    Registered User
    Join Date
    04-07-2008
    Posts
    3
    Sorry, here is the attachment.
    Attached Images Attached Images

+ 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