Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Excluding Some Data from a Chart.
Written by Allen Wyatt (last updated June 13, 2020)
This tip applies to Excel 97, 2000, 2002, and 2003
Pam keeps a month's worth of data in a table and created a chart based on that data. The data was collected from information generated on her company's shop floor. The data includes weekends, but Pam doesn't want the weekend data included in the chart. She knows that she could hide the rows and they would be excluded from the chart, but she still needs the hidden rows to be displayed in the table. In other words, she wants them displayed in the data table, but not in the chart.
There are a couple of ways you could approach this problem. One is to simply make a copy of your data (maybe copy the whole worksheet) and then delete the rows that contain weekend data. You would still have your master data for whatever purposes you need, but you could base your chart on the modified copy of that data.
The drawback to this, of course, is that it creates two sets of data that may need to be updated or kept in sync in some way. It may be better to base your chart on a non-contiguous data range. Assume, for a moment, that your data was in A1:B15, and that there were weekends in rows 7, 8, 14, and 15. You could, within the chart, set the data range for the source data to this:
You could also create a named range that refers to the non-contiguous ranges you want included in the chart. You could then use the named range in your chart, as a reference to the source data.
Finally, if you don't mind adding another column to your data, you could use the new column for your chart source. Assume, for a moment, that your readings are in column A and the dates of those readings are in column B. In each cell of column C you could place the following formula:
You then end up with a series of readings for all weekdays; the weekends show #N/A for the reading. You can base your chart on this data and Excel will ignore the #N/A values. You can even hide column C so it does not distract from your source data.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (7843) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Excluding Some Data from a Chart.
Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!
Gridlines are often added to charts to help improve the readability of the chart itself. Here's how you can control ...Discover More
Once you create a chart, you aren't limited to keeping the data series in the order they originally appeared. You can ...Discover More
When creating charts that will be used by other people, you may need to take some liberties with the presentation of your ...Discover More
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.