Change Legend Color in Excel: A Simple Guide
In Excel, legend colors can significantly enhance the appearance of charts and make data more comprehensible. However, Excel doesn't provide a direct option to change legend colors. But fear not, with a bit of creativity and understanding of how Excel works, we can achieve this. Let's delve into how to change legend colors in Excel.
Before we start, note that changing legend colors involves a bit of workaround using conditional formatting and color scales. We'll be creating a reference column to hold our desired colors and then using this column to format our data series.
Preparing Your Data
For our example, let's assume we have a dataset with columns 'Category', 'Sales', and 'Profit'. We want to plot a stacked 100% bar chart with the legend colors of our choice.
First, add a new column, say 'Color Code', and assign each category a color code from Excel's color palette. You can find these codes by clicking on the color icon while formatting cells. For instance, for the category 'A', you might use 'FF0000' for red.
Creating a Stacked 100% Bar Chart
Select your data (excluding the new 'Color Code' column), go to 'Insert' > 'Column' or 'Bar' > choose 'Stacked 100%'. This will create a stacked bar chart where the total of each series adds up to 100%.
Since we want to change the legend colors, click on the chart to select it, then click on the data series (the bars in the chart) to select it. Right-click and select 'Format Selection' or use theFormat dropdown in the 'Chart Styles' group on the 'Design' tab.
Applying the Color Codes to the Data Series
In the sidebar, under 'Fill', click on the color icon next to 'Solid fill'. Select 'More Fill Colors...' at the bottom of the palette.
In the 'Standard' tab, there's a box for 'Custom'. Click on it, then under 'Custom', click on the color box, and type in your color code from the 'Color Code' column. Click 'OK' to apply this color to the selected data series. Repeat this for each data series to apply your desired legend colors.
Changing Legend Colors
Now, we'll format the legend to match the colors we've applied to the data series.
Right-click on the legend and select 'Format Legend'. In the sidebar, under 'Fill', select the color you want for your legend. Ensure the 'Legend Entries (Series)' are sorted in the order that matches your data series.
Applying Color Scales for Better Visualization
To make our chart more visually appealing, we can use color scales that show the data range and distribution. Click on the data series to select it, then go to 'Format Selection' or use the 'Format' dropdown in the 'Chart Styles' group.
Under 'Fill', click on the color scale icon (other than the solid fill color icon). Choose the color scale that best represents your data. The legend colors will automatically update based on the scale chosen.
With this technique, you can create visually engaging charts with custom legend colors in Excel. Happy charting!