+ Reply to Thread
Results 1 to 7 of 7

Ignoring Null Values when Plotting an Excel 2003 Bar Chart

  1. #1
    Registered User
    Join Date
    08-30-2012
    Location
    Minneapolis, MN
    MS-Off Ver
    Excel 2007
    Posts
    11

    Ignoring Null Values when Plotting an Excel 2003 Bar Chart

    I have some data that I'm plotting on a bar chart and I'm trying to "HIDE" the columns with zero or null values. Basically, if the column is blank, I don't want a "gap" on the chart. Is there a way to do this? I'm not getting this to work. Excel Forum Charting Help.xls

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Ignoring Null Values when Plotting an Excel 2003 Bar Chart

    Hi molson,

    A similar question recently came up. See post number 4 in:
    http://www.excelforum.com/excel-char...ml#post3552155

    The macro may point you in the correct direction solve your problem. That post was for line charts, however. If you can post a sample workbook, we may be able to better solve your problem.

    Lewis
    Last edited by LJMetzger; 01-21-2014 at 12:53 PM. Reason: Added line chart note.

  3. #3
    Registered User
    Join Date
    08-30-2012
    Location
    Minneapolis, MN
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Ignoring Null Values when Plotting an Excel 2003 Bar Chart

    Hello -

    Here is a sample workbook that I'm working from.
    I'm not very familiar with macro's.

    Excel Forum Charting Help.xls

  4. #4
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Ignoring Null Values when Plotting an Excel 2003 Bar Chart

    Hi,

    Sorry it took so long. Please try the attached workbook, which should do what you want.

    Here are the instructions, which are also included on Sheet 'Notes' in the Workbook:
    Chart creation Instructions:
    1. The chart will be created on the same Sheet as the 'Data Table' which MUST BE the Active Sheet.
    No Charts are DELETED. They are placed ON TOP of existing Charts.
    2. Create an extra column in the data table called 'Bar Color'. Color each cell in the 'Bar Color' column with the color required for that item. This is needed because the default colors don't seem to be used.
    3. Start out on the sheet that contains the 'Data Table'.
    4. Run Macro 'CreateBarChartWithContiguousBars'. A prompt will appear, and selection MUST BE MADE to include 'Product Name' at the TOP LEFT and 'Bar Color' at the BOTTOM RIGHT.
    5. A Chart will be created that looks like your original chart in the original location on the Active Sheet.
    6 A SHADOW data table is created starting on Row 71. IT MUST NOT BE DELETED unless the Chart is deleted.
    7. To change a value in the Chart, put a new value in the ORIGINAL DATA TABLE, EXCEPT that
    a cell that was formerly BLANK or ZERO can not be changed. A new chart is required.
    8. The 'Bar Color' column in the ORIGINAL data table can be deleted after the Chart is created.

    Lewis

  5. #5
    Registered User
    Join Date
    08-30-2012
    Location
    Minneapolis, MN
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Ignoring Null Values when Plotting an Excel 2003 Bar Chart

    This works great! Thanks for your help. No worries on timeframe.

  6. #6
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Ignoring Null Values when Plotting an Excel 2003 Bar Chart

    I'm glad it worked out for you.

    The challenging part was not hiding the zero/null values, but making the rest of the chart look identical to your original.

    Lewis

  7. #7
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Ignoring Null Values when Plotting an Excel 2003 Bar Chart

    Andy Pope has an alternate solution that DOES NOT required VBA, but requires modification of data tables.
    http://www.excelforum.com/excel-char...sing-data.html

    Lewis

+ 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. Chart plotting null data
    By treva26 in forum Excel General
    Replies: 2
    Last Post: 06-09-2010, 08:07 PM
  2. Plotting Null Values
    By solnajeff in forum Excel Charting & Pivots
    Replies: 9
    Last Post: 05-09-2007, 05:16 PM
  3. [SOLVED] Chart ignoring formulas but only plotting formula results
    By JD in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 02-03-2006, 03:35 PM
  4. [SOLVED] Excel 2003 xy chart - problem plotting more than 330 points
    By ehmcneill in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 12-16-2005, 08:25 PM
  5. ignoring null values in graph
    By Kris B in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 07-05-2005, 03:05 PM

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