+ Reply to Thread
Results 1 to 5 of 5

Exclude Blank cells while plotting a graph

  1. #1
    Registered User
    Join Date
    04-22-2009
    Location
    Boston
    MS-Off Ver
    Excel 2013
    Posts
    68

    Exclude Blank cells while plotting a graph

    Hi there,

    I have two columns A and B. I am plotting a graph which takes 100 rows of column A and B as its source data.

    The data in both the columns changes with time. This results in fluctuation of no. of rows in which the data is available. So in one time only first 50 rows are there and rest are blank ..whereas sometime later only first 90 rows are there with the data and rest 10 are blank.

    I don't want Excel to include these blank cells while plotting a graph.

    How do I do that?

    Please reply,

    Kapil.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887

    Re: Exclude Blank cells while plotting a graph

    Hi Kapil,

    Perhaps this will work for you. I don't have Excel 2003 in front of me, so I hope I'm giving you the correct steps..

    Create a chart as you would like to see it based on the values in column A and B (let's say it has 100 rows of data, with headers in A1 and B1). Once that is done, we'll make it dynamic:

    Click Insert -> Name -> Define...
    Type a new name, such as XAXIS and for the formula, use =OFFSET(Sheet1!$A$2,0,0,COUNTA(Sheet1!$A:$A)-1,1)

    Click Insert -> Name -> Define... again
    Type a new name, such as YAXIS and for the formula, use =OFFSET(Sheet1!$B$2,0,0,COUNTA(Sheet1!$B:$B)-1,1)

    On your chart, click on one of the data bars or points or pie sections (whichever chart type you used, click on the series somewhere). The formula for the series should show up in the Formula bar, similar to: =SERIES(Sheet1!$B$1,Sheet1!$A$2:$A$100,Sheet1!$B$2:$B$100,1)

    Change that formula in the Formula bar to: =SERIES(Sheet1!$B$1,Book1!XAXIS,Book1!YAXIS,1)

    (Note: If your defined names are at the sheet level, not the workbook level, change 'Book1' to 'Sheet1' or your sheet name.)

    Once you press Enter you should be all set. Remove data rows, add them.. your chart should update.

    Hope that helps!

  3. #3
    Registered User
    Join Date
    04-22-2009
    Location
    Boston
    MS-Off Ver
    Excel 2013
    Posts
    68

    Re: Exclude Blank cells while plotting a graph

    I didn't quite get the last line

    "Remove data rows, add them.. your chart should update."

    I followed the steps you mentioned before it.

  4. #4
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887

    Re: Exclude Blank cells while plotting a graph

    What that means is:

    If you have 100 rows of data, your chart should reflect that. If you then add more rows of data to columns A/B (or remove rows of data), the chart should automatically update right before your eyes.

    So if you deleted 10 rows (A91:B100, for example), the chart should update instantly to reflect the new 90 rows of data.

  5. #5
    Registered User
    Join Date
    03-24-2011
    Location
    Karlsruhe, Germany
    MS-Off Ver
    2007
    Posts
    1

    Re: Exclude Blank cells while plotting a graph

    Hi,

    I have the exact problem now but I got lost with "Click Insert -> Name -> Define..."

    I am using Excel 2007 and I don't seem to see "Name" in the ribbon after clicking "Insert"

    Appreciate your urgent help on this. Thanks.

+ 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