Repeated text in a Chart Legend: you can see it if you look closely in the Legend Entries.
This was a very unusual scenario. (I have not been able to exactly duplicate it in another file.)
The legend was automatically generated from the Series names. I found that the source for the repeated Series name was a range – $A$4:$B$4. This is not normally allowed in Excel 2007, and it is the situation that I cannot reproduce.
However, I found that sometimes I could see the old legend text remain in place after I changed the source cell. Excel did clean this up when I next edited the Data source.
I also noticed that, if there is something in column A on the same row as the column headings, and row headings in column B, Excel will automatically create an explicit legend like this.
- TopHeading RowHeading1
- TopHeading RowHeading2
The legend text can be manually edited, and it does not immediately reset when TopHeading is deleted.
Taken together, these clues suggest that Excel copies the contents of the source into some invisible cache, and only updates it under ‘normal’ circumstances.
Avoiding this ‘feature’
- Complete the table and its headings before making the chart.
- Eschew Merged-cells in the vicinity of data that will be charted.
- Simplify problematic charts by saving and reopening the spreadsheet as an Excel 97 file.
These limitations should be ‘in the fine print somewhere’, but I have not previously encountered a description of this problem. It happens in Excel 2007 but not Excel 2003. Guided by these empirical results, I found unofficial advice.
- http://www.eggheadcafe.com/software/aspnet/35201070/merged-cells-and-creating.aspx
- http://msgroups.net/microsoft.public.excel.charting/Excel-2007-Merged-cells-as-data-source
BOTTOM LINE: Don’t Merge Cells.
Acknowledgement
I thank Margaret for finding this phenomenon.