+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 25

Thread: Don't display zero values

  1. #1
    Registered User
    Join Date
    09-30-2011
    Location
    Lithuania
    MS-Off Ver
    Excel 2010
    Posts
    44

    Don't display zero values

    I have a column of data that I'd like to visualize in a line chart. The cells in the column contain formulas that calculate numbers added to other sheets every month. The adjacent column has the names of each month. New data appears when the data for the month is added.

    I'd like to ask the chart to not display the values that are currently zero, because we haven't arrived at that month yet. So, for instance, the cell in the column for November 2011 has a zero, because the range it sums has no data in it yet.

    Is there a way to do this without having to go back to each chart every month and change the range to add-in the new data?

    Thank you, very much, for any help!
    Last edited by Nate Westcott; 10-17-2011 at 02:23 PM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    2003 & 2007 & 2010
    Posts
    11,349

    Re: Don't display zero values

    alter your formula to output NA() instead of what I assume you are currently using which is ""

    Use CF on the cells to hide the #N/A value if that is an issue.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    09-30-2011
    Location
    Lithuania
    MS-Off Ver
    Excel 2010
    Posts
    44

    Re: Don't display zero values

    I'm a bit new to Excel formulas; I'm excited to learn, and I appreciate the help.

    If my formula were
    ='Sheet1'!$G$3:$H$22
    But I want to allow for data added through $H$32, how would I represent output NA() in the formula?

    I'm not seeing an #N/A value for these cells.

    Thank you!

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    2003 & 2007 & 2010
    Posts
    11,349

    Re: Don't display zero values

    not sure what that formula is meant to mean.

    Can you post example workbook of what you currently have.
    Cheers
    Andy
    www.andypope.info

  5. #5
    Valued Forum Contributor scottylad2's Avatar
    Join Date
    09-03-2010
    Location
    edinburgh
    MS-Off Ver
    Office 2007 Prof & Office 2010 Student Edition
    Posts
    617

    Re: Don't display zero values

    Why don't you create the line chart from data that indirectly references your chart? By creating a vlookup table that references your data, it will only pull data where the month is entered in table one on my sample and in turn your cahrt will update and include that month in the lines. The dynamic ranges are stored in the name manager which you can find on the data tab, once created, in the Select Data dialogue on the chart select the apppropiate name range Hopefully this makes sense once you see the sample
    Attached Files Attached Files
    Windows 7 using Office 2007 & 2010

    Remember your [ code ] [ /code ] tags, makes reading soooo much easier

  6. #6
    Registered User
    Join Date
    09-30-2011
    Location
    Lithuania
    MS-Off Ver
    Excel 2010
    Posts
    44

    Re: Don't display zero values

    I've attached a sample sheet with the arrangement of data I have.

    I imagine this isn't the best way to arrange this, so I'm quite open to suggestions.

    Thank you so much for your help!
    Attached Files Attached Files

  7. #7
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    2003 & 2007 & 2010
    Posts
    11,349

    Re: Don't display zero values

    formula in Totals!C3 , then copy down.

    =IF(Apples!$B2="",NA(),Apples!$B2)
    Cheers
    Andy
    www.andypope.info

  8. #8
    Registered User
    Join Date
    09-30-2011
    Location
    Lithuania
    MS-Off Ver
    Excel 2010
    Posts
    44

    Re: Don't display zero values

    Thank you - this is certainly closer to what I was hoping to do. With the change, my question also changes a bit.

    Is there a way to ask the chart to not display the months where the value is N/A?

    Ideally, I would like to extend the range for the chart out a few years, so that when a value is added, the new month and the value appears.

    In other words, ideally, when the new values for October are added, the chart would then display October's value total, without showing October before that at all.

  9. #9
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    2003 & 2007 & 2010
    Posts
    11,349

    Re: Don't display zero values

    See the other reply about dynamic named ranges.

    Or see this
    Attached Files Attached Files
    Last edited by Andy Pope; 10-17-2011 at 09:58 AM.
    Cheers
    Andy
    www.andypope.info

  10. #10
    Registered User
    Join Date
    09-30-2011
    Location
    Lithuania
    MS-Off Ver
    Excel 2010
    Posts
    44

    Re: Don't display zero values

    Following the above example workbook, I've modified mine to include dynamic name ranges, but I'm having trouble understanding how to modify my formula to reflect the totals.

    I've attached the new version, and thank you for having a look!

    A simple question, but what does the 3,0 refer to in the formula:

    =IF($F3="","",VLOOKUP($F3,CurrentDataTable,3,0))
    Attached Files Attached Files

  11. #11
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    2003 & 2007 & 2010
    Posts
    11,349

    Re: Don't display zero values

    No idea. You seem to have spun off on a tanget.
    Cheers
    Andy
    www.andypope.info

  12. #12
    Valued Forum Contributor scottylad2's Avatar
    Join Date
    09-03-2010
    Location
    edinburgh
    MS-Off Ver
    Office 2007 Prof & Office 2010 Student Edition
    Posts
    617

    Re: Don't display zero values

    The Vlookup is wrong because the original range it applied to has been checged, the 3 should refer to column 3 but it's now refering to a single column. I'm having a look at the sample now
    Windows 7 using Office 2007 & 2010

    Remember your [ code ] [ /code ] tags, makes reading soooo much easier

  13. #13
    Registered User
    Join Date
    09-30-2011
    Location
    Lithuania
    MS-Off Ver
    Excel 2010
    Posts
    44

    Re: Don't display zero values

    Quote Originally Posted by scottylad2 View Post
    The Vlookup is wrong because the original range it applied to has been checged, the 3 should refer to column 3 but it's now refering to a single column. I'm having a look at the sample now
    Thank you - and this is very helpful; I've not used the vlookup function yet.

    In the end, the chart would ideally display only the data of the totals that are now in the "Current Data" column, not the individual values for Apples, Oranges, and Pears. I appreciate your help, and I'm learning a lot from this!
    Last edited by Nate Westcott; 10-17-2011 at 11:58 AM.

  14. #14
    Valued Forum Contributor scottylad2's Avatar
    Join Date
    09-03-2010
    Location
    edinburgh
    MS-Off Ver
    Office 2007 Prof & Office 2010 Student Edition
    Posts
    617

    Re: Don't display zero values

    I think you're maybe not too familiar with Dynamic named ranges, well worth a read up on them. In the sample i'm attaching, the sheet marked Totals will house your DISPLAY data, ie your chart and the tanle the chart is referencing and also a summary of the data thats being collected from the INPUT taps, Apples Oranges and Pears. If you go into the Apples tab, hold control and tap F3 on your keyboard, when the name dialogue box pops up, highlight the word Apples, then at the bottom of the box click on the checkered pattern at the right hand side and you will see what part of the data is being refered to in the dynamic range.

    Come out of that then enter some data next to November and do the same, you'll see it's now including that data

    The same happens in the orange and Pears tabs, as soon as you add data in any of the Fruits Tabs it gets added to the Totals Tab in table that shows your Fruits. The green box now references to that to hold the data for the chart

    fel free to ask if theres a part your not understanding

    On the chart, the new month is now visible also. You only need input into any of the tabs marked as fruits, never into the Totals tab
    Attached Files Attached Files
    Last edited by scottylad2; 10-17-2011 at 12:40 PM.
    Windows 7 using Office 2007 & 2010

    Remember your [ code ] [ /code ] tags, makes reading soooo much easier

  15. #15
    Valued Forum Contributor scottylad2's Avatar
    Join Date
    09-03-2010
    Location
    edinburgh
    MS-Off Ver
    Office 2007 Prof & Office 2010 Student Edition
    Posts
    617

    Re: Don't display zero values

    I may have edited this since you last looked
    Windows 7 using Office 2007 & 2010

    Remember your [ code ] [ /code ] tags, makes reading soooo much easier

+ 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.2.0