+ Reply to Thread
Results 1 to 10 of 10

Chart only data with values in Table (ignore blanks)

  1. #1
    Registered User
    Join Date
    02-27-2008
    Posts
    16

    Chart only data with values in Table (ignore blanks)

    Hi all,

    I need help with setting up a template to create a control chart. I only want to show values that are in the table, ignoring blanks/NA's but want it dynamic so the formulas are pasted down to around 300 rows (or more if necessary), and the user simply pastes in their data and the chart populates automatically as the source data will be set to look at these 300 rows.

    I've got most of it working but there is still empty space to the right of the chart.

    What am I doing wrong or is there a way around this?

    Thanks in advance.
    Last edited by Akshay; 02-07-2017 at 06:48 AM. Reason: Adding attachment

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,723

    Re: Chart only data with values in Table (ignore blanks)

    It is difficult to envisage what you are describing, so it would help if you attached a sample Excel workbook, and use that to explain what you are trying to achieve, maybe with a Before and After sheet.

    To do this, click on Go Advanced (below the Edit Window) while you are composing a reply, then scroll down to and click on Manage Attachments and the Upload window will open. Click on Browse and navigate to (and double-click) the file icon that you want to attach, then click on Upload and then on Close this Window to return to the Edit window. When you have finished composing your post, click on Submit Post.

    Pete

  3. #3
    Registered User
    Join Date
    02-27-2008
    Posts
    16

    Re: Chart only data with values in Table (ignore blanks)

    Thanks Pete,

    I've now attached the workbook. The "before" tab shows the chart with the range selected to row 30. The "after" tab shows how I'd like it to look.

    I want to share the template with my colleagues so all they need to do is paste in their own data and the chart just picks up the rows with data in, ignoring the blanks. This way, it leaves it simple for them to use.
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,819

    Re: Chart only data with values in Table (ignore blanks)

    It sounds like it should be a standard "dynamic chart using dynamic named ranges" type of problem: http://peltiertech.com/dynamic-charts/
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  5. #5
    Registered User
    Join Date
    02-27-2008
    Posts
    16

    Re: Chart only data with values in Table (ignore blanks)

    I looked at that but couldn't get my head around the forumula's and they seem to indicate I can't have any blanks in the data. I want the chart to look at a large number of rows but only want those values pasted in by the user to be plotted on the chart, so that only those x-axis variables are shown and no white space to the right (due to the empty cells beneath the data.

    This is so the user simply pastes in their data and the chart picks it up automatically, ignoring the blank rows underneath, which I want to keep to allow for larger data sets to be pasted without the need for the user to copy down the formula's that create the control limits.

  6. #6
    Registered User
    Join Date
    02-27-2008
    Posts
    16

    Re: Chart only data with values in Table (ignore blanks)

    I looked at that but couldn't get my head around the forumula's and they seem to indicate I can't have any blanks in the data. I want the chart to look at a large number of rows but only want those values pasted in by the user to be plotted on the chart, so that only those x-axis variables are shown and no white space to the right (due to the empty cells beneath the data.

    This is so the user simply pastes in their data and the chart picks it up automatically, ignoring the blank rows underneath, which I want to keep to allow for larger data sets to be pasted without the need for the user to copy down the formula's that create the control limits.

  7. #7
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,723

    Re: Chart only data with values in Table (ignore blanks)

    It's probably best to extract only the valid data to another sheet and use that as the source for your graph. I'm going out soon, but I'll take a look later on.

    I wasn't sure why you had all those #N/A errors in the file that you attached - is that just to produce blanks on the right side of your graph?

    Pete

  8. #8
    Registered User
    Join Date
    02-27-2008
    Posts
    16

    Re: Chart only data with values in Table (ignore blanks)

    Yes and no. I had those NA's to try and eliminate the blanks on the right but it didn't work. I was just trying to set up an easy to use template where the chart looks at a set number of rows eg. 30 so up to 2.5 years of data by month.

    The user can then paste their own data in, which could range from 12 to 30 months and the chart is automatically populated but with no blanks on the chart if their data consisted of less than 30 months.

  9. #9
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,819

    Re: Chart only data with values in Table (ignore blanks)

    I looked at that but couldn't get my head around the forumula's and they seem to indicate I can't have any blanks in the data. I want the chart to look at a large number of rows but only want those values pasted in by the user to be plotted on the chart, so that only those x-axis variables are shown and no white space to the right (due to the empty cells beneath the data.
    I would be curious what you tried that failed. It might help us see exactly what you are having trouble understanding.

    With your sample data, I would have expected a name definition similar to =OFFSET(Before!$B$2,1,0,COUNTA(Before!$B$3:$B$3000),1) for the X_axis_data (similar functions for the remaining data series). Did you try something like that, or something else.

    The point about "blanks" in the data depends on exactly what you have and what you are doing, and how those things affect the 4th argument of the OFFSET() function. I chose the COUNTA() function for this because your example shows the x-axis data containing a block of text strings followed by a lot of truly blank cells (no "empty string as the result of a formula" cells). Other scenarios will require different functions for this argument to accurately determine how far down the data extend.

    I created two named ranges and a dynamic chart based on those ranges as an example.
    Attached Files Attached Files
    Last edited by MrShorty; 02-08-2017 at 11:56 AM. Reason: add attachment

  10. #10
    Registered User
    Join Date
    02-27-2008
    Posts
    16

    Re: Chart only data with values in Table (ignore blanks)

    Hi MrShorty, thanks for the attached worksheet you provided.

    I have extended the chart range now to capture the other columns of data for the control limits but if I add more x and y data then the chart won't display these unless I increase the chart data range when clicking on "Select Data" on the chart. Is there a way around this? I would prefer the user not to do this themselves as the whole exercise is geared around providing a fully automated solution.

+ 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. [SOLVED] sumproduct to rank values but ignore blanks
    By Blake 7 in forum Excel General
    Replies: 6
    Last Post: 05-24-2016, 03:30 PM
  2. Chart, ignore blanks
    By rwernlund in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 07-12-2015, 01:56 PM
  3. Replies: 3
    Last Post: 05-08-2013, 07:16 AM
  4. Line chart should ignore blank data values
    By kenelder in forum Excel General
    Replies: 2
    Last Post: 06-10-2011, 03:50 AM
  5. Data Validation, Ignore Blanks
    By U6C84 in forum Excel General
    Replies: 11
    Last Post: 09-25-2007, 01:38 PM
  6. Get Pivot Table To Ignore Blanks
    By StevenAFC in forum Excel General
    Replies: 2
    Last Post: 09-11-2007, 05:06 AM
  7. [SOLVED] Ignore Blanks in Data Validation
    By Ricky in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 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