Chart & Visualization Issues

Change the Color of Part of a Line in an Excel 2016 Chart

Aamir Naveed AkramAamir Naveed Akram Nov 22, 2026 868 views

Question details

The user wants to apply a different color to a portion of a line in an Excel 2016 chart.

Change the Color of Part of a Line in an Excel 2016 Chart
Product
Microsoft Excel 2016
Device & OS
not provided
Scenario
The user is formatting part of a line chart and wants to distinguish an entire portion of the line.
Observed behavior
Formatting the selected data point changes a small spot rather than the desired portion of the line.
Before you start

Identify the data points where the line color should change. Check that the chart's source values are arranged in worksheet rows so you can create helper series.

Solution 1Recommended

Use Helper Series to Color Different Portions of the Line

Split the plotted values into separate series when you need reliable control over the color of each portion.

A line chart connects data points within a series. Formatting a single data point does not reliably recolor an entire portion, so use separate series that share a boundary point.

1
Identify the color boundary

In the worksheet, locate the row where the first color should end and the second should begin. For example, assume categories are in A2:A10, values are in B2:B10, and the boundary is row 6.

2
Create the helper series

Enter First color in C1 and Second color in D1. In C2, enter =IF(ROW()<=6,B2,NA()); in D2, enter =IF(ROW()>=6,B2,NA()). Fill both formulas down through row 10.

3
Add the helper series to the chart

Right-click the chart and choose Select Data. Remove the original series from the chart, then click Add to add C2:C10 and D2:D10 as separate series, using C1 and D1 as their names.

4
Check the category labels

In Select Data Source, click Edit under Horizontal (Category) Axis Labels and select A2:A10. Click OK to apply the chart data.

5
Format each line

Click one helper series in the chart, right-click it, and choose Format Data Series. Under Fill & Line, open Line and choose a color. Repeat for the other series.

Use Helper Series to Color Different Portions of the Line
Changing a middle section: To color only a middle section, create separate series for the portions before, during, and after it. Include each boundary point in both adjoining series so the lines meet.
WPS Spreadsheets

Color Line Chart Sections in WPS Spreadsheets

Use helper series in WPS Spreadsheets to divide a line at a chosen data point, then format each series with its own color.

  1. 1. Open the workbook: Open WPS Spreadsheets and use Open to select the Excel workbook containing your chart.
  2. 2. Add helper columns: For values in B2:B10 with a color boundary at row 6, enter =IF(ROW()<=6,B2,NA()) in C2 and =IF(ROW()>=6,B2,NA()) in D2. Fill both formulas down to row 10 and add headings in C1 and D1.
  3. 3. Update the chart data: Right-click the chart and choose Select Data. Replace the original series with the helper ranges C2:C10 and D2:D10, and use A2:A10 for the category labels.
  4. 4. Set the series colors: Right-click each line series, choose Format Data Series, and use the line formatting controls to select a different color for each portion.
  5. 5. Save the workbook: Choose Menu > Save As and select an Excel workbook format such as XLSX to save the updated chart.
Give different portions of a line chart different colorsOpen and edit Microsoft Excel XLSX and XLS filesUse familiar spreadsheet formulas and chart controlsCreate and edit spreadsheets for free
microsoft office alternative - wps office

Frequently Asked Questions

Why does changing a data point color affect only a small spot?

The selected point is an individual chart element, not the entire portion of the line. Use separate helper series and format each series to control the line colors.

How do I make the two colored portions meet?

Include the boundary value in both helper series. For example, formulas using ROW()<=6 and ROW()>=6 both include the value in row 6.

Can I color a section in the middle of the line?

Yes. Create three helper series for the values before, during, and after the section. Include each boundary point in both adjoining series, then format the middle series with the desired color.

Will the helper series change my original worksheet values?

No. The helper formulas refer to the original values and return NA() outside each portion. You replace the plotted series through the chart's Select Data dialog, not the original values.