Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cleared Chart Legend - How to Get it Back?

Status
Not open for further replies.

rnordquest

New member
Jul 17, 2003
148
Once I've cleared an Excel data series chart legend entry, how do I turn it back on?
 
Replies continue below

Recommended for you

If you are talking about getting the entire legend back, try this:
1) On chart page, Chart/Chart Options/Legend, check "Show Legend" and check one of the locations, (Bottom, etc.)

If you are talking about getting just the text for one entry in the legend, try this:

2) On chart page, Chart/Source Data/Series. At the bottom left will be a list of all the data series you have plotted on your chart. Select the data series which you want to name. In "Name:" at the right, you'll see what will appear in the Legend when the Legend is turned on. You can type some text in the Name: box, or you can click on the small button to the right of this Name: box (called the Collapse Dialogue button), then point to a navigate to a worksheet, and select the cell which has the text you want in the legend for this data series.
 
We're talking your item #2. The cell is already selected for the data series and there is something in the cell. I even tried changing what was in the cell to see if it would display but no luck. Then I tried typing something in the name box and no luck.

Sometime in the past, someone might have clicked in the legend itself and cleared it. How would I undo that?
 
See 1) of my post to restore the legend. Does that work?

I don't know if you do backups--sometimes it's worth it to return to the backup directory and restore what was there.
 
The legend has been there all the time. It just is not displaying data series #2. It does display #1. What I had to do was add a third series and delete the problem series #2. It was relatively easy in this case but I was hoping to stumble upon the knowledge of how to undo something that was done before.
 
when you went to the Chart/Source Data/Series, what was in the Name: box for series 2?

I don't know if this is your problem, but I've had this happen before. The Name: box points to a cell in a worksheet. I delete the row or column with that particular cell. Now the Name: box shows #REF! because I've deleted the reference. There is another instance that showed <blank> in the Name: box, but now I can't recreate that instance, so I can't tell you why <blank> showed up.
 
My guess is that someone went into the legend and cleared the name. The cell certainly has something in it. This was in my second post. It doesn't matter whether I change what is in the linked cell or replace the link with something I type in the Name:box directly; the problem was clearing the displayed name in the legend itself.

To clear I select the legend, select the series name, then right click and select clear. Poof, it's gone. I just don't know how to undo it without recreating the whole series.
 
((rap)) ((rap)) ((rap))
that's me, knocking my head with a stick. So here's what I did. I selected the legend in my chart, then clicked the entire label for my Series 1. Delete button makes it go away with no apparent way to retrieve it. What if I select the ENTIRE LEGEND, then delete? Legend gone. Now I went to Chart/Chart Options/Legend, checked "Show Legend" and checked one of the locations, (Bottom, etc.). The Legend reappears with the Series 1 label and symbol that I deleted in the previous step. Does that work for you?
 
Yes it does. It's less than best but it will have to do. Sometimes I can have many changes to the original legend that would have to be redone. Maybe I'll call Uncle Bill and ask that he fix this. I'm sure we'll see it when MS Excel 2918 comes out.
 
It seems you found it out by yourselves, but the VBA help gives the following "insight" ;-) in the help for the LegendEntry object:
Remarks

There’s no direct way to return the series or trendline corresponding to the legend entry.

After legend entries have been deleted, the only way to restore them is to remove and recreate the legend that contained them by setting the HasLegend property for the chart to False and then back to True.

Cheers,
Joerd

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor