+ Reply to Thread
Results 1 to 13 of 13

Dynamic Chart to not include blanks

  1. #1
    Registered User
    Join Date
    04-20-2012
    Location
    Bournemouth
    MS-Off Ver
    Excel 2007
    Posts
    34

    Dynamic Chart to not include blanks

    Hi all,

    I am sure this question has been asked in here before, apologies if so as I couldn't find it.

    I am essentially pulling through data into a new sheet with the aim of the graph being dynamic.

    My issue is I can`t exclude the blanks. Any thoughts on how to get round this?

    Thanks,

    Scott

  2. #2
    Forum Contributor
    Join Date
    09-13-2012
    Location
    Atlanta, USA
    MS-Off Ver
    Office 2003, 2010
    Posts
    230

    Re: Dynamic Chart to not include blanks

    This really depends on what the problem is. If you could attach a sample worksheet I bet you would get more accurate help. If your problem is handling 0s in a dynamic range, try this:

    I have done this before, and it is hard to get completely around. One way to go about it is to set your labels in the chart to show "" if their corresponding cells are empty.

    If you have labels in A1 and data in B1, you could say,

    =if(B1="", "", "Label 1")

    Then in B1

    =if(your formula = 0, "", your formula)

    You can then set the number formatting to exclude 0s.

  3. #3
    Registered User
    Join Date
    04-20-2012
    Location
    Bournemouth
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Dynamic Chart to not include blanks

    I`ll give this ago, unfortunately I have confidential data so can`t upload this, but have knocked together an example.

    dyamic chart example.xlsx

    In my actual document there is an IF which shows only what my true criteria is.

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Dynamic Chart to not include blanks

    Hi Scott,

    This should be what you need...

    Dynamic Chart
    HTH
    Regards, Jeff

  5. #5
    Registered User
    Join Date
    04-20-2012
    Location
    Bournemouth
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Dynamic Chart to not include blanks

    Thanks Jeff!! My table has a formula in every cell and seems to break when I do it this way. Any ideas?
    Last edited by scott28; 11-12-2012 at 10:22 AM.

  6. #6
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Dynamic Chart to not include blanks

    Hi Scott,

    I still have to go with what Jake says, we need a sample to see what is the best avenue to take.

    Appreciate the sample you posted, but if it's not close to the actual sample then we are not seeing the whole picture.

  7. #7
    Registered User
    Join Date
    04-20-2012
    Location
    Bournemouth
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Dynamic Chart to not include blanks

    I have tweaked it to better show what I`m doing.

    dyamic chart example.xlsx

    Where the zero's are, even If I make them appear blank, they still populate the chart.

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

    Re: Dynamic Chart to not include blanks

    You need to modify the sheet formula slightly and then use 2 named ranges.

    CHTLABEL: =OFFSET(Sheet1!$A$1,1,0,COUNT(Sheet1!$C:$C),1)
    CHTDATA: =OFFSET(CHTLABEL,0,2)
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

  9. #9
    Forum Contributor
    Join Date
    09-13-2012
    Location
    Atlanta, USA
    MS-Off Ver
    Office 2003, 2010
    Posts
    230

    Re: Dynamic Chart to not include blanks

    I see what you are saying. Jeff may be able to speak to this better than me, but I have always wondered if this was possible:

    If you look at the chart, the formula is:

    =SERIES(Sheet1!$C$1,Sheet1!$A$2:$A$10,Sheet1!$C$2:$C$10,2)

    Is it possible to run a COUNTIF on the series and set a dynamic range for the =SERIES function itself where the COUNTIF is the column number?

    Like...
    =SERIES(Indirect(Sheet1!$C$1, Sheet1!&C&COUNTIF(A2:A10 <> 0)) but with much better syntax?

    I am not sure if this is possible, but its always something I've wondered.

  10. #10
    Forum Contributor
    Join Date
    09-13-2012
    Location
    Atlanta, USA
    MS-Off Ver
    Office 2003, 2010
    Posts
    230

    Re: Dynamic Chart to not include blanks

    I think andy just answered my question before I asked it...Impressive.

  11. #11
    Registered User
    Join Date
    04-20-2012
    Location
    Bournemouth
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Dynamic Chart to not include blanks

    Thanks Andy, Will try and implement this on my data. Cheers Jake aswell for your help.

  12. #12
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Dynamic Chart to not include blanks

    Give this a try

    Sorry should have refreshed, didn't see Andy and Jake had replied.
    Attached Files Attached Files
    Last edited by jeffreybrown; 11-12-2012 at 11:12 AM.

  13. #13
    Registered User
    Join Date
    11-13-2012
    Location
    NY, NY
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Dynamic Chart to not include blanks

    This is exactly what I needed!!


    Thanks for the help

+ 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