+ Reply to Thread
Results 1 to 5 of 5

Charts - how to limit x-axis to rows with populated values

  1. #1
    Registered User
    Join Date
    01-04-2013
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2010
    Posts
    30

    Charts - how to limit x-axis to rows with populated values

    [edit] SOLVED BY STEVE=TRUE (summary on my next post)
    I have a lot of charts that I publish every week for budget meetings. The chart range for the first one is 'Hist Table'!$A$1:$R$100
    The A column is a list of fiscal weeks (FY13-P2-W2, FY13-P2-W3, etc) and the rest of the columns make up the y-values. They are set to be "" (blank) in their formulas if there is no data matching that week.

    What I would like to do is leave the chart range for the entire range through the end of the year, and have the x-axis only stretch up to the current week (for which there is data). Instead, I either have to have a big blank on the right side of the chart or keep updating the range for every chart every week.

    Is there a solution to this? Thanks so much in advance!
    Last edited by MCunningham; 02-02-2013 at 07:35 PM.

  2. #2
    Forum Contributor
    Join Date
    09-13-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    216

    Re: Charts - how to limit x-axis to rows with populated values

    Hi MCunningham,

    You can do this in a few ways. I would suggest checking out this tutorial to see if it can help.

    Case Study - Creating a Dynamic Chart in Excel Using Offset Formula

    Let me know if it helps.

    Steve=True

  3. #3
    Registered User
    Join Date
    01-04-2013
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Charts - how to limit x-axis to rows with populated values

    Steve, that's brilliant! I never thought using dynamic references for names, nor did I know that you could reference named ranges in a chart!

    I appreciate that a lot. I'm even going to feel a little bad when I show this to my boss and don't give you credit!

  4. #4
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Charts - how to limit x-axis to rows with populated values

    They are set to be "" (blank) in their formulas if there is no data matching that week.
    Rather than have your formulas return blanks, have them use the NA() function. Example: =IF(A1=100,A1,NA())
    Excel does not plot N/A values.

    You might also consider using Pivot Tables based on an Excel Table.
    Tables are automatically treated as dynamic named ranges - no need to manually create them.

    With Tables, you should learn to use Structured References

    Dynamic and Interactive Charts
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  5. #5
    Registered User
    Join Date
    01-04-2013
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Charts - how to limit x-axis to rows with populated values

    Quote Originally Posted by Palmetto View Post
    Rather than have your formulas return blanks, have them use the NA() function. Example: =IF(A1=100,A1,NA())
    Excel does not plot N/A values.

    You might also consider using Pivot Tables based on an Excel Table.
    Tables are automatically treated as dynamic named ranges - no need to manually create them.

    With Tables, you should learn to use Structured References

    Dynamic and Interactive Charts
    I've already tried this. The problem is the x-axis values are already filled in, so the chart will just have a big blank on the right side where there are no y-values. Steve=true's solution works great, though.

+ 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