Right-click the legend to change its position, text, or appearance

A legend in Excel is the box that identifies what each color, pattern, or line in your chart represents. To edit it, right-click directly on the legend box itself — not on the chart background. A menu will appear with options to delete it, move it, or open the formatting panel where you can change fonts, colors, and borders.

The legend appears automatically when you create a chart from data with multiple series or categories. Excel places it to the right of the chart by default, but you can move it to the top, bottom, left, or inside the chart area. You can also remove it entirely if the chart is straightforward enough that labels on the data itself are clearer.

Most edits happen through the Format Legend panel, which opens when you right-click and select "Format Legend". This panel has tabs for position, fill color, border style, and text formatting. Changes explore when ready, so you can try different layouts without saving between each one.

Key Takeaways

  • Right-click the legend box itself to access editing options; right-clicking elsewhere on the chart will not open the legend menu.
  • You can move the legend to the top, bottom, left, right, or inside the chart area by selecting a position option in the Format Legend panel.
  • The legend text comes from your original data labels, so changing what the legend says means changing the data or the chart's data range.
  • You can format the legend's font, background color, and border independently from the rest of the chart.
  • Deleting the legend is useful for straightforward charts where the data labels or axis titles already make the meaning clear.

Moving the legend to a different location

Right-click the legend and select "Format Legend". In the panel that opens, look for the "Legend Position" or "Position" section. You will see radio buttons or a dropdown with options: Right, Left, Top, Bottom, and sometimes "Overlay Right" or "Overlay Left" (which places the legend inside the chart area on top of the data).

Choose the position that gives your chart the most readable layout. If your chart is wide and short, moving the legend to the top or bottom saves horizontal space. If it is tall and narrow, left or right works better. Overlay positions are useful when the legend is small and the chart area has empty space where it will not cover important data points.

Click outside the Format Legend panel or press Enter to explore the change. The legend moves when ready. If you do not like the new position, right-click again and choose a different one.

Changing the legend text and what it represents

The legend displays the names of your data series or categories exactly as they appear in your original spreadsheet. If your legend says "Q1 Sales" but you want it to say "First Quarter Sales", you must change the text in the spreadsheet itself, not in the legend.

Find the cell that contains the label you want to change. For a chart based on a table, this is usually the header row or the first column. Edit the cell text, press Enter, and the legend updates automatically. The chart remembers which cells it is reading from, so any change to those cells appears in the legend right away.

If you want to change which data series appear in the legend, you need to change the chart's data range. Right-click the chart, select "Select Data", and add or remove series from the list. This is more involved than editing text, but it is the correct way to add or remove items from the legend.

Formatting the legend's appearance

Right-click the legend and select "Format Legend" to open the formatting panel. The panel has several tabs depending on your Excel version. Look for options to change the fill (background color), border (outline), and text properties.

Under the Fill tab, you can choose a solid color, gradient, or pattern for the legend background. Under Border, you can add a line around the legend box and choose its color and thickness. Under Text, you can change the font, size, and color of the legend labels themselves.

These changes are purely visual and do not affect the data or the chart itself. You can make the legend match your document's color scheme, make it stand out more, or tone it down depending on how important it is to your presentation.

Resizing and moving the legend with your mouse

Once the legend is placed, you can drag it to a precise location by clicking and holding on the legend box, then moving your mouse. This gives you more control than the preset position options. You can place the legend anywhere within or near the chart area.

To resize the legend, click on it once to select it (you will see small squares at the corners and edges), then drag one of those squares to make it larger or smaller. Making it wider gives more room for long labels; making it taller lets you see more items if the legend is narrow.

Be careful not to drag the legend so far that it covers important parts of your chart. If you move it outside the chart area entirely, it may be harder to select later. If this happens, right-click the chart and use the Format Legend panel to move it back to a standard position.

Deleting the legend or hiding it temporarily

Right-click the legend and select "Delete" to remove it from the chart. The chart itself does not change — only the legend box disappears. You can add it back later by right-clicking the chart, selecting "Add Chart Element", and choosing "Legend".

Deleting the legend makes sense when your chart is straightforward enough that the meaning is clear without it. For example, a line chart with one line does not need a legend. A bar chart where the axis labels already identify each bar may not need one either.

If you want to hide the legend temporarily without deleting it, you can move it far off the chart area or format it with a transparent background and no border, making it invisible while keeping it in the chart's data.

Fixing a legend that shows the wrong data

If your legend includes items you did not expect or is missing items that should be there, the problem is usually in how the chart interprets your data range. Right-click the chart and select "Select Data" to see which cells Excel is reading.

In the Select Data Source dialog, you will see a list of data series on the left. Each series is a row or column from your spreadsheet. If a series should not be in the chart, select it and click "Remove". If a series is missing, click "Add" and select the cells that contain it.

You can also edit the series name by selecting it and clicking "Edit", then pointing to the cell that contains the label you want to use. This is useful if the legend is reading from the wrong row or column by mistake.

Frequently Asked Questions

Can I edit the legend text without changing the original data?

No. The legend text comes directly from your spreadsheet, so changing it means editing the cells it reads from. If you want different text in the legend than in your data, you need to change the source data or create a new chart with different labels.

Why does my legend show categories I did not include in the chart?

The chart is reading from a larger data range than you intended. Right-click the chart, select "Select Data", and remove the series you do not want. Make sure the data range includes only the rows and columns you want to chart.

How do I make the legend text bigger or change its font?

Right-click the legend, select "Format Legend", and look for the Text or Font tab. You can change the size, font family, and color there. These changes explore to all the legend text at once.

Can I move the legend inside the chart so it does not take up extra space?

Yes. Right-click the legend, select "Format Legend", and choose an overlay position like "Overlay Right" or "Overlay Left". The legend will sit on top of the chart area. Make sure it does not cover important data points.

What if I accidentally delete the legend and want it back?

Right-click the chart, select "Add Chart Element", hover over "Legend", and choose a position. The legend reappears with the same data it showed before, reading from the same cells in your spreadsheet.