need legend to not show blank series (stacked bar chart)

SH in WA

New Member
Joined
Sep 29, 2006
Messages
1
Hi, I have a stacked bar chart that has about 70 different series in the legend, and they are being stacked into about 6 groups across the x-axis. It's dynamic in that the chart pulls the data from columns that I created with the offset function, so I change one number (the offset) and it pulls up a different column of data, so with the same graph I can pull up whichever of the ~40 columns in my worksheet I want to see at that moment. It looks great.

The problem is that it's hard to tell which series is which because there are about 70 in the legend, and there aren't that many colors. For any given offset that I choose, many of the series are actually blank. I would like the legend to only show the non-blank series, but I can't figure out how to do it. I've used the IF function to make the series name blank if it has no data. This helps, because the legend doesn't show the name, but it still shows a color box for it, which takes up space. How can I get it to not even show the box?

I have experimented with having the IF function put a blank or a NA in the series name or in the data values if it's a zero, but this didn't seem to work. The solution needs to be automatic rather than by hand one by one because I'm pulling in so many different columns to graph with my offset. Thanks for any ideas! I'm using Windows XP and Excel 2003.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop

Forum statistics

Threads
1,141,098
Messages
5,704,319
Members
421,338
Latest member
Pepess

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top