Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Shade Between Plots in Excel: Step-by-Step

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Excel has no built-in "shade between two lines" button, but you can achieve it by adding an area chart series to your existing line chart and formatting it with a semi-transparent fill. The trick is to plot the area series on a secondary axis scaled to match the primary one, so the shaded band lines up exactly with your two lines. Below is the full method, which works in Excel for Microsoft 365 and recent desktop versions of Excel for Windows and Mac. Menu labels can differ slightly between versions, so if a name below doesn't match exactly, look for the closest equivalent in the chart ribbon.

What You'll Need

  • Excel for Windows or Mac (desktop version; Excel for the web has limited chart formatting and may not support every step)
  • A worksheet with your data arranged so each series is in its own column, with a shared set of X values (categories or dates) in the first column
  • Two series that define the top and bottom of the area you want to shade, plus any other series you want to plot as lines

Step-by-Step

  1. Set up your data: column A holds the X values (dates or categories), column B the upper line, column C the lower line, and any further columns hold the other series you want plotted. The upper values must always be greater than or equal to the lower values.
  2. Select all the data, then go to Insert > Charts and choose a line chart with markers or a smooth line chart, depending on your preference.
  3. Add the two boundary series again as area series: right-click the chart and choose Select Data, then click Add. For Series name pick the upper-boundary column header, and for Series values select the upper column. Click OK.
  4. Repeat the Select Data > Add step for the lower-boundary column so both boundary series exist twice: once as lines, once as extra series.
  5. Right-click one of the duplicate series in the chart and choose Change Series Chart Type. In the Change Chart Type dialog, use the Chart Type dropdown for that series to set it to Area, and tick the Secondary Axis box. Do the same for the other duplicate series.
  6. Make the secondary axis match the primary axis exactly: right-click the secondary vertical axis (the one on the right), choose Format Axis, and note the minimum and maximum. Then set the primary and secondary axes to the same fixed minimum and maximum bounds. You may need to set the primary axis bounds manually too. This alignment step is what makes the shading land precisely between the two lines.
  7. Right-click the upper area series and choose Format Data Series (or Format Data Point). Under Fill, choose a solid fill in your desired colour and set Transparency to around 50–70%. Under Border, choose No Line.
  8. Format the lower area series with a solid white fill (or the same colour as your chart background) and no border. Because Excel draws area series from the bottom up, this white area covers everything below the lower line, leaving colour visible only between the two boundaries.
  9. Hide the secondary axis: click it, then in Format Axis set Label Position to None, and set the line to No Line so it disappears.
  10. Delete the duplicate entries from the legend: click the legend once, then click the unwanted entry and press Delete. Do this for both area series so only the real lines are named.
  11. Click the chart, then use Chart Design > Add Chart Element to add a chart title and axis titles if needed, and confirm everything lines up when you resize the chart.

Common Mistakes

  • Skipping the axis alignment: if the secondary axis has different bounds, the shading will float above or sink below your lines.
  • Setting only one axis manually: both the primary and secondary vertical axes must have identical fixed minimum and maximum values.
  • Forgetting the white fill under the lower series: without it, the shading extends all the way to the bottom of the chart.
  • Shading with fully opaque fills, which hides gridlines and other series behind the area.
  • Using unsorted or non-monotonic X values, which distorts how the area series is drawn.

Tips

  • Use a light fill colour with high transparency so lines, markers and gridlines stay readable.
  • If your data updates regularly, the chart updates automatically as long as the new rows fall inside the series ranges — consider formatting your data as a Table so ranges expand on their own.
  • For a confidence band look, shade between a mean minus deviation and mean plus deviation series computed with formulas.
  • You can layer more than one shaded band by repeating the duplicate-series trick with additional pairs of columns.
  • To change the band colour later, just adjust the fill of the upper area series; the white masking series needs no change unless you change the chart background colour.

Troubleshooting

The shaded area doesn't line up with the lines. This is almost always a mismatch between the primary and secondary axis scales. Recheck that both vertical axes have identical fixed bounds, including the major unit if gridlines look off.

The shading covers the whole chart. The lower area series probably lost its white/background fill, or it's drawn behind the upper area. Select the lower area series and confirm it has a solid fill matching the chart background, and check the series order under Select Data.

The area series appears as a line. The chart type change didn't apply. Right-click the series, choose Change Series Chart Type, and set that specific series to Area in the dialog.

The shading disappeared after editing data. If you deleted or moved columns, the series references may point at empty cells. Open Select Data and confirm each series still points to the right ranges.

Options are greyed out in Excel for the web. The web app doesn't support every chart formatting option. Open the workbook in the desktop version of Excel to finish the formatting.

Frequently Asked Questions

Can I shade between two lines without a secondary axis?

In practice the secondary axis is the reliable method. Some users stack area series on a single axis with a computed "band height" column (upper minus lower) plus an invisible base, but that requires helper columns and still needs careful formatting. The secondary-axis method above is the most common approach.

Does this work in older versions of Excel?

Yes. The Select Data, Change Series Chart Type and Format Data Series features exist in older desktop versions too, though the dialogs look slightly different.

Can I do this in Excel for the web?

Only partially. Excel for the web can display charts with shaded areas but has limited formatting controls, so it's best to build the chart on the desktop app.

Can I shade between two curves instead of straight lines?

Yes. Use a scatter chart with smooth lines for your curves, then add the boundary series as area series on a secondary axis with matching bounds, following the same steps.

Why does Excel draw area series in a strange order?

Area series are drawn back-to-front in legend order. If the wrong area is on top, open Select Data and move the white masking series up or down in the list until the layering looks right.

Will the shading update automatically when my data changes?

Yes. As long as the new values stay within the referenced ranges (or the data is formatted as a Table), the chart, lines and shaded band all refresh together.