To change a chart line in Excel for Microsoft 365 on Windows, select the line, right-click it, choose Format Data Series, then open Fill & Line (the paint-bucket icon) and choose a color under Line. For a drawn line, select it and use Shape Format > Shape Outline. The right method depends on whether you mean a chart series, a shape, a border, or worksheet gridlines.
What You’ll Need
- An Excel workbook with the chart, shape, cells, or worksheet whose line color you want to change.
- Permission to edit the workbook. If it is read-only or protected, you may need to save an editable copy or ask the owner to unlock it.
- A color choice that will remain easy to distinguish against the background. If the chart will be printed or shared, consider checking it in that format too.
The steps below use Excel for Microsoft 365 on Windows. The chart and shape controls are similar in current desktop versions, although the ribbon layout can vary slightly. Excel for the web has fewer formatting options, and Mac ribbon labels or menu placements may differ.
Step-by-Step
- Identify what kind of line you are changing. Click the line once and notice what becomes selected. A chart data line usually belongs to a series and may display markers. A straight or curved line drawn on the sheet is a shape. A cell edge is a border, while the faint lines across an otherwise empty worksheet are gridlines. Each has a separate color control, so first select the right object.
- Change a chart series line. Click the chart, then click the particular plotted line. If the first click selects the whole chart, click the line again; avoid clicking a marker if you mean to format the complete series. Right-click the selected line and choose Format Data Series. The Format Data Series pane opens. Select the paint-bucket icon, expand Line, and use the Color control to choose a theme color, standard color, or More Colors. The selected series updates as you make the choice.
- Confirm that you selected the intended series. When a chart has several lines, click each one in turn and check the selection label or highlighted line before changing its color. You can also select the chart and use Chart Format > Current Selection to pick a named series from the list, then choose Format Selection. This is useful when series overlap or are too thin to click accurately. Change one series at a time and check that the legend entry still corresponds to the line you changed.
- Format only one chart data point, if needed. Select the series, then click the individual point or marker again so that only that point is selected. Right-click and choose Format Data Point. In the pane, open Fill & Line and adjust the available line or marker options. Options depend on the chart type and point selected. A point-level change is appropriate for highlighting an outlier; it is not the best way to recolor every segment in a series.
- Change a line shape. Click the drawn line on the worksheet or drawing canvas. Open the Shape Format tab, select Shape Outline, and choose a color. Use More Outline Colors if you need a custom shade. The same outline menu can change the line’s weight or dash style. If the object is an arrow, Shape Outline changes its shaft; use Shape Format > Shape Outline > Arrows to adjust arrowheads where the control is available.
- Change a cell border color. Select the cell or range whose border you want to recolor. On the Home tab, open the arrow beside the Borders button in the Font group. Point to or select Line Color, choose a color, then open the Borders menu again and select the specific edge or border preset to apply it. Choosing a color alone may set the color for the next border you draw without changing existing edges. For existing borders, apply the chosen color to the relevant edge or use More Borders to set the line style and color in the Format Cells dialog.
- Change worksheet gridline color. On Windows, select File > Options > Advanced. Under Display options for this worksheet, choose the correct sheet from the dropdown, then set Gridline color. Click OK. This setting affects the selected worksheet’s gridlines, not chart lines or cell borders. If gridlines are hidden, turn on View > Gridlines for the sheet to see them. Gridline color settings are not available in the same way in Excel for the web.
- Check the result and save. Click outside the formatted object so selection handles do not obscure the result. Verify the line against the chart background and nearby lines, then save the workbook. If the file uses a theme, keep in mind that theme colors can change when the workbook theme changes; a custom color is more consistent when a specific shade must be preserved.
On a Mac, select a chart series and open the formatting pane using the contextual chart formatting controls or the right-click menu; choose the line color in the series formatting options. For a shape, select it and use the Shape Format tab’s outline controls. Some Windows-only paths, particularly File > Options > Advanced for gridline color, do not appear on Mac; check Excel > Settings or Preferences for available sheet display settings. In Excel for the web, chart and shape formatting is more limited, so open the workbook in the desktop app if the needed color control is missing.
Common Mistakes
- Formatting the chart area instead of the series. Selecting the chart background changes its fill or border, not the plotted line. Click the actual series or use the Current Selection list to target it.
- Changing marker fill when you mean line color. A line chart may have markers with their own fill and outline. In the formatting pane, make sure you have expanded Line rather than changing only the marker settings.
- Expecting a color choice to recolor existing borders by itself. In the Borders menu, select the desired border edge or preset after setting Line Color. Otherwise, the color may only be used for a border you apply later.
- Confusing gridlines with borders. Worksheet gridlines are display guides and are not the same as cell borders. A border you add can remain visible when gridlines are turned off or when cells are printed.
- Applying a color to the wrong object in a busy chart. Overlapping lines are easy to mis-select. Use the Current Selection list or temporarily hide another series if needed, then restore it after formatting.
- Choosing a color that is hard to read. A pale or similar shade can disappear against the chart background or blend with another series. Check contrast and do not rely on color alone when readers must distinguish important data.
Tips
- Use the same color consistently. For recurring reports, use a theme color or enter a custom color so the same category is represented consistently across charts. A theme color follows the workbook theme; a custom value is preferable when the exact shade matters.
- Improve visibility as well as color. In the series pane, adjust the line width or dash type when a line is too faint or similar to another. For a shape, use Shape Outline > Weight or Dashes. A thicker solid line and a thinner dashed line can remain distinct even when printed in grayscale.
- Keep the chart legend in sync. Excel normally updates a series’ legend key when you recolor the series. If a legend is manually edited or the chart was built from separately drawn shapes, verify that the key still communicates the correct category.
- Use the Selection Pane for crowded sheets. Choose Home > Find & Select > Selection Pane to view and select objects by name. Rename important shapes in the pane so they are easier to identify later.
- Make a reusable chart style. After formatting a chart, you can save it as a template from the chart’s right-click menu using Save as Template. This can help carry a consistent visual style into other charts, though you should check the result when the new chart has different series or chart types.
- Check the finished workbook in context. View the chart at its intended size and consider print preview or a PDF if it will be distributed. A line that looks clear when zoomed in may be too thin or low-contrast on a printed page.
Troubleshooting
The line color control is missing or disabled. Confirm that the line itself or its series is selected and that the correct formatting pane is open. If the workbook is protected, the object may not be editable. If you are in Excel for the web, open the file in desktop Excel to access fuller formatting controls.
The whole chart changes instead of one line. You probably selected the chart area or plot area. Click the series directly, use the Current Selection dropdown to choose its name, and select Format Selection. In a chart with multiple series, confirm the selected name before applying the color.
The line looks unchanged after choosing a color. Check that you changed Line > Color, not marker fill, and that line formatting is enabled rather than set to no line. For a border, reapply the border edge after choosing Line Color. Also check for transparency or a very thin line that makes the new shade hard to see.
Gridlines do not appear in the new color. Make sure the correct worksheet is selected under Display options for this worksheet, and verify View > Gridlines is enabled. Gridlines may be hidden behind a cell fill, and they are not a substitute for borders when you need printed cell outlines.
The color changes when the workbook is opened elsewhere. A theme color can look different if the workbook theme or application display differs. For a specific shade, choose a custom color and check the workbook in the other Excel version. Some web and mobile versions may not show every formatting option even though they display the saved result.
Frequently Asked Questions
Can I change the color of just one line in a multi-line chart?
Yes. Select that series, open Format Data Series > Fill & Line > Line > Color, and choose a color. Use the Current Selection list if the lines overlap.
Can I change the color of only one segment or point?
For a chart point, select the series and then select the point again before using Format Data Point. A line segment between points may not have independent formatting in every chart type; if you need a differently colored section, consider splitting the data into separate series.
How do I change the color of a line I drew on the sheet?
Select the line shape and use Shape Format > Shape Outline. If you cannot select it, open the Selection Pane and choose the object from the list.
Why does my cell border stay black?
Setting Line Color does not always recolor borders already applied. Select the cells, choose a color from Home > Borders > Line Color, then apply the relevant border edge or open More Borders and set the color there.
Can Excel change worksheet gridline color?
Yes, in desktop Excel for Windows, use File > Options > Advanced and choose a color under Display options for this worksheet. This setting is separate from cell borders and may not be available in Excel for the web.
Can I use a color not shown in the palette?
Yes. For chart lines and shapes, choose More Colors where available. For borders, use More Borders to access the border color controls. Custom colors can help match a brand palette or keep related charts consistent.
Related
- How to Add a Color Key in Excel for Clearer Worksheets
- How to Add a Drop-Down List in Excel
- How ROUNDUP Works in Excel: Syntax and Examples
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Add a Column to an Excel Chart: Steps and FixesTo add a column of data as a new series in an Excel chart, select the chart, choose…
- Detailed Gantt Chart in Excel: Build and Manage a PlanTo make a detailed Gantt chart in Excel, list each task with a start date and duration, create…
- Stacked Bar Pareto Chart in Excel: Build and FormatTo make a stacked Pareto chart in Microsoft Excel for Microsoft 365 on Windows, sort categories by their…
- How to Insert a Treemap Chart in Excel: Step by StepTo insert a Treemap chart in Excel, arrange your data in columns from broad category to specific item,…
- Power Pivot Calculated Field: Measures vs ColumnsIn Power Pivot, an aggregated calculation for a PivotTable is usually a DAX measure, often informally called a…
- Excel Pie Chart: Group Small Categories into OtherTo group data in an Excel pie chart, first summarize the values you want to show, then chart…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.