Adjusting the Order of Items in a Chart Legend

by Allen Wyatt
(last updated August 16, 2014)


Zoran has a chart with eight XY (scatter) curves. For each curve he defined a plot order. When he adds a legend to the chart, the eight curves are listed in it. However, the order of those eight curves seems to be random. Zoran would like to change the order of entries in the chart legend, but can't find a way how to make such a change.

When you add a legend to a chart, the order in which the legend items appear is dictated by the order in which the data series are charted. For instance, let's suppose you have four data series referred to as North, South, East, and West. If the data series are plotted in this order, then that is the order in which they will appear in the legend from top to bottom (for legends positioned at the left or right of the chart) or from left to right (for legends positioned at the top or bottom of the chart).

The key, then, is to change the order in which your data series are plotted, and then Excel automatically changes the order in which they are displayed in the legend. (If you want the data series to be plotted in an order different from which they appear in the legend, Excel cannot handle that. The legend order is always tied to the data series order.)

To change the data series manually, try this little trick: click one of the data series in your chart. In the Formula bar, you should see something like this:


The SERIES function controls what is displayed for this particular data series (the one you selected by clicking). Notice that there are four parameters for the function. The first is the series name, the second is the X range, the third is the Y range, and the fourth is the order in which this particular data series is plotted. Change the fourth parameter and Excel immediately replots your data and updates the order in which items appear in the legend. When you change the parameter, the order parameter for all the other data series are automatically updated, as well.

Another way to change the order of the data series (and thus affect the legend) is to right-click any element of the chart (including the legend) to display a Context menu. Click the Select Data option and Excel displays the Select Data Source dialog box. (See Figure 1.)

Figure 1. The Select Data Source dialog box.

At the left side of the dialog box you see an area entitled "Legend Entries (Series)." This area details the data series being plotted. You can select one of the entries and use the up and down arrows (just to the right of the Remove button) to adjust the order in which the entries are plotted. When you click OK, the chart is replotted and the legend updated to reflect the plotting order.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (13214) applies to Microsoft Excel 2007, 2010, and 2013.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He  is president of Sharon Parq Associates, a computer and publishing services company. ...


Embedding Linked Documents

Word allows you to link one document to another document rather easily. If you later want to grab the contents of a ...

Discover More

Changing the Footnote Continuation Separator

When you add a really long footnote to a document, it could be that the entire footnote might not fit on the page where ...

Discover More

Printing Images Based on Hidden Text Setting

When you print your document, the images in the document are normally printed. What if you want only some of your images ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More ExcelTips (ribbon)

Putting a Chart Legend On Its Own Page

Displaying information using charts in Excel is easy and there are a variety of chart styles to choose from. Integrated ...

Discover More

Formatting the Border of a Legend

When you create a chart, Excel often includes a legend with the chart. You can format several attributes of the legend's ...

Discover More

Moving a Chart's Legend

Need to move a chart legend to a different place on the chart? It's easy to do using the mouse, as described in this tip.

Discover More

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.


If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 8 - 2?

2017-09-01 22:29:55

Tim J.

This tip doesn't work for me as my data is in an Excel Table, not a range. (Thanks for your site anyway.)

2017-01-25 10:30:18


Thank you for this. I really didn't know how to do it. Pretty basic, yet extremely useful!

2016-08-26 11:05:08


I have Excel 2010 and the little arrows move the legend entries in the Select Data Source, but they do not change in the chart legend.

How can I get legend to change?

2016-08-23 19:14:38

Rolf Jentoft

I was having a similar problem with a legend not updating after using the arrows on the select data window and clicking OK. This was a graph with primary and secondary data. I closed the file after saving and re-opened it and the legend was correct.

2016-05-24 13:47:57

Kevin Pond

I have tried both methods the chart still plots all primary axis elements and then secondary axis elements regardless of the order I put them in.

2016-05-24 02:25:28

Col Delane

I've tried the approaches described in this tip, but the first series shown in my legend won't budge from pole position!

I'm also NOT able to change the "order" argument in the Series function (I can edit the value in the formula bar, but Excel will not accept my change!)

2016-05-24 01:59:08

Col Delane

Dean, Lester & Jim
I suspect the order is by axis first, then series within the axis group. So if you want the line series to be on top in the legend, try swapping the axis (i.e. L to R, R to L)on which each series is plotted. (I haven't tested this - just an idea)

2016-03-01 16:45:37

Jim Devoe

I'm having the same issue as Dean and Lester. 2 bars, 2 lines, bars are on top of legend despite re-ordering manually, repeatedly.

Is there any fix to this? I'm about to hand draw the legend and paste it as an image over the "real" legend just to work around.


2015-04-16 14:22:39

Lester Banks

I have the same problem as Dean. I have a line over stacked columns. I want the line to be the top entry in the legend, but Excel forces it to the bottom of the legend, regardless of how I order the data.

2014-12-23 16:24:08

Dean Barker

Hi Allen, I notice when I have a primary & secondary axis, with both columns and lines plotted, it will not let me re-order. Excel is putting all the columns in the legend first, then the lines after that in the legend. I need to be able to show a column then a line, then a column then a line in my legend, how can I accomplish that ?

2014-08-17 03:58:56


However, when you change the order as described in the second part of the article, clicking on the chart no longer shows the range of data used by the chart.

This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.