+ Reply to Thread
Results 1 to 12 of 12

I need to prevent graph from displaying future months with no sales data

  1. #1
    Forum Contributor
    Join Date
    04-27-2009
    Location
    Dallas, TX
    MS-Off Ver
    Office 365
    Posts
    215

    I need to prevent graph from displaying future months with no sales data

    I have this spreadsheet that has 2014 and 2013 sales data which I graph as a bar chart and calculate organic growth. I'm trying to make this 100% automated by using formulas in my chart's data source. I have it set up so that the 2013 data does not populate until 2014 data is entered for the new month. The problem is that my boss doesn't want to see month's with no data. So in the sample spreadsheet that I posted he just wants to see a graph with data for January through August. I've tried setting the value to #N/A, "#N/A", NA() and "na" thinking that it would not plot error data. I even tried setting the months to the same thing thinking that the axis wouldn't plot error data. Surely there is a simple way to automate this without the need for a macro. If anyone has any ideas I sure would be grateful.
    Attached Files Attached Files
    Last edited by mvparker79; 09-06-2014 at 02:12 PM.

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

    Re: I need to prevent graph from displaying future months with no sales data

    search forum for dynamic named range examples.

    Use of NA will only suppress data markers and shorten lines. To remove categories you need to use named ranges as the source for each data series.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Contributor
    Join Date
    04-27-2009
    Location
    Dallas, TX
    MS-Off Ver
    Office 365
    Posts
    215

    Re: I need to prevent graph from displaying future months with no sales data

    I've been looking over and playing with dynamic named ranges and I'm still not getting a solution. The most I'm able to do is get my chart to not include the month on the axis, yet the axis categories is just blank in those out months. This is because my 2013 data is not truly blank. It contains a formula that tells it to appear blank until 2014 sales are entered. The only way to get it to work is if I delete the 2013 data. That will not work as 2013 sales are hard coded and this needs to be a one step process. Here is the workbook I've got so far with the named ranges. I've got a graph on sheet1 that works, but only if series1 and series2 are blank.
    Attached Files Attached Files
    Last edited by mvparker79; 09-05-2014 at 02:26 PM.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: I need to prevent graph from displaying future months with no sales data

    Another (cheap and nasty) way would be to hide the columns for the months you have not yet got to
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Forum Contributor
    Join Date
    04-27-2009
    Location
    Dallas, TX
    MS-Off Ver
    Office 365
    Posts
    215

    Re: I need to prevent graph from displaying future months with no sales data

    Right. I thought about that, but this is to be used by the president of the company and I need this to be as dummy proof as possible.

  6. #6
    Forum Contributor
    Join Date
    04-27-2009
    Location
    Dallas, TX
    MS-Off Ver
    Office 365
    Posts
    215

    Re: I need to prevent graph from displaying future months with no sales data

    Does anyone have any ideas?

  7. #7
    Forum Contributor
    Join Date
    04-27-2009
    Location
    Dallas, TX
    MS-Off Ver
    Office 365
    Posts
    215

    Re: I need to prevent graph from displaying future months with no sales data

    I still really need some help on this if anyone is willing.

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: I need to prevent graph from displaying future months with no sales data

    Not sure if this will be any better than what you have, but try this.

    In A3 enter 1/1/2014 and format as Custom Format MMMM
    In A4, copied down...
    =IF(B4="","",EDATE(A3,1))
    formatted Custom MMMM

  9. #9
    Forum Contributor
    Join Date
    04-27-2009
    Location
    Dallas, TX
    MS-Off Ver
    Office 365
    Posts
    215

    Re: I need to prevent graph from displaying future months with no sales data

    Thank you but that also didn't work because there are formulas in columns B and D. When I remove those formulas it works just fine. But then it is not automated.

  10. #10
    Forum Contributor
    Join Date
    04-27-2009
    Location
    Dallas, TX
    MS-Off Ver
    Office 365
    Posts
    215

    Re: I need to prevent graph from displaying future months with no sales data

    I JUST FIGURED IT OUT!!!

    The dynamic named range was close but not 100%. IT should have been:

    =OFFSET(Graph!$A$3,0,0,COUNTIF(Graph!$A:$A,">0"))

    Countif greater than 0! I'm so excited right now. Thanks for your help!

  11. #11
    Registered User
    Join Date
    09-04-2014
    Location
    Manchester, England
    MS-Off Ver
    2007
    Posts
    3

    Re: I need to prevent graph from displaying future months with no sales data

    I found an excellent article called Dynamic Charts that showed me exactly how to do this. http://peltiertech.com/WordPress/dynamic-charts/

  12. #12
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: I need to prevent graph from displaying future months with no sales data

    Im glad you got your question resolved, and thanks for sharing the answer and that link with us

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Displaying ALL months in Pivot table, even if there is no data
    By ahorwitz in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 06-23-2016, 12:09 PM
  2. Replies: 2
    Last Post: 07-22-2014, 02:15 AM
  3. Add chart trendline into future without displaying actual data line
    By HeyInKy in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 04-24-2014, 08:58 AM
  4. Unwanted graph data for future values.
    By Canus in forum Excel General
    Replies: 3
    Last Post: 11-09-2010, 04:28 AM
  5. Predicting Sales Data in future!
    By nandhamnk in forum Excel General
    Replies: 10
    Last Post: 07-30-2009, 05:26 AM

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