Where to find and edit your legend in Excel

A legend in Excel is the box that identifies what each color or pattern in your chart represents. To change the name that appears in that legend, you edit the data range your chart is pulling from, not the legend itself. Excel reads the column headers or row labels you've set up and displays them automatically in the legend.

The fastest way is to right-click directly on the legend entry you want to change, select "Edit Data," and modify the source data. But the more reliable method—especially if you're working with multiple charts or sharing the file—is to change the actual header or label in your spreadsheet, then let Excel update the legend to match.

If you want to rename just the legend without touching your data, you can also click the legend itself and edit the text directly, though this breaks the link between your data and your chart label, so Excel won't update it automatically if your data changes later.

Key Takeaways

  • Excel legends pull their names from your spreadsheet headers or row labels, so changing the source data is the most reliable way to update what appears in the legend.
  • Right-clicking a legend entry and selecting "Edit Data" opens the data range dialog where you can see exactly which cells feed the legend names.
  • Editing the legend text directly (by clicking it twice slowly) works but disconnects the legend from your data, so future changes to your spreadsheet won't update the legend.
  • If your legend shows series names you didn't intend, check that your chart is reading the correct row or column as labels rather than as data values.

Changing the legend by editing your data source

This is the method to use if you want the legend to stay connected to your spreadsheet. Select your chart by clicking on it once. Go to the Chart Design tab (on Mac, this appears in the ribbon when a chart is selected). Click Select Data.

A dialog box opens showing two sections: "Legend Entries (Series)" on the left and "Horizontal (Category) Axis Labels" at the bottom. In the left section, you'll see each series name as it currently appears in your legend. Click the series name you want to change, then click Edit. A smaller dialog appears with a field showing the cell reference—for example, =Sheet1!$B$1. This cell contains the text that appears in your legend. Change the reference to point to a different cell, or close this dialog and edit the original cell in your spreadsheet directly. When you click OK, the legend updates when ready.

Editing legend text directly in the chart

If you want to change the legend text without altering your source data, you can edit it inside the chart itself. Click on your chart to select it, then click once on the legend entry you want to rename. Wait a moment, then click again on that same entry—not on the whole legend box, but on the specific text. The text should now be editable, and you can type a new name.

This method is quick for one-off changes, but it has a drawback: if you later change the data in your spreadsheet, the legend will not update automatically. The legend text is now independent of your data. Use this approach only when you're certain the legend name won't need to change again, or when you're creating a final version of a chart that won't be updated.

Fixing a legend that shows the wrong series names

Sometimes your legend displays names you didn't expect—perhaps it's showing row numbers instead of your actual labels, or it's including a data column you meant to exclude. This usually means Excel is reading your data range incorrectly.

Select the chart and open Select Data again. Look at the "Horizontal (Category) Axis Labels" section at the bottom. If this field is empty or points to the wrong range, click Edit and specify the correct cells that contain your category labels. For example, if your chart is a line graph with months across the bottom, this field should point to the cells containing the month names. Then check the "Legend Entries" section to make sure each series listed is one you actually want to display. If you see a series you don't need, select it and click Remove.

Renaming multiple legend entries at once

If you need to change several legend names, the most efficient approach is to edit your source data directly in the spreadsheet. Locate the cells that contain the headers or labels your chart is reading. Edit them one by one in the spreadsheet itself—you don't need to touch the chart. As you save each change, the legend updates automatically.

This is especially useful if you're working with a template or a file that will be updated regularly. Anyone who opens the file later and changes the data will see the legend update without having to remember to edit the chart separately. It also means if you accidentally delete or modify a legend entry, you can undo the change in the spreadsheet and the chart will revert too.

Removing or repositioning the legend

If you don't want to rename the legend but want to move it or hide it entirely, right-click on the legend and select Format Legend. A panel opens on the right side of your screen. Under "Legend Position," you can choose to place it to the right, left, top, or bottom of your chart, or select "None" to hide it completely.

You can also click and drag the legend to a new position by clicking on it once to select the whole legend box, then dragging it where you want it. This is useful when the legend is covering important parts of your chart data.

Frequently Asked Questions

Can I change just one legend entry without changing my spreadsheet?

Yes. Click the chart, then click the specific legend entry twice slowly to edit the text directly. The entry becomes independent of your data, so it won't update if your spreadsheet changes. This works best for final versions of charts that won't be revised.

Why does my legend show numbers instead of the names I want?

Excel is reading the wrong cells as your series names. Select the chart, open Select Data, and check that the Legend Entries section points to the correct cells containing your actual labels, not to a data column or row numbers.

If I edit the legend text directly, will it update when I change my data?

No. Direct edits to legend text break the connection to your source data. If you want the legend to update automatically when your spreadsheet changes, edit the source data cells instead, and let Excel update the legend for you.

How do I remove a series from the legend without deleting the data?

Select the chart, open Select Data, find the series name in the Legend Entries list, select it, and click Remove. The data stays in your spreadsheet but stops appearing in the chart and legend.

Can I have different names in the legend than in my spreadsheet?

Yes, but only if you edit the legend text directly in the chart. Keep in mind this disconnects the legend from your data, so future changes to your spreadsheet won't update the legend automatically.