# Shading between 2 lines on a chart?

#### EricF

##### New Member
I am attempting to shade the area between 2 lines on a chart in Excel? Is this possible? Thanks

### Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
I gave this a shot, but can't seem to get it to work the way I would like it too. My goal is simply to show a range and have the range filled in (a band if you will). For example... A chart that starts with the number 1.0 (say \$1.0M of revenue) and increases by 3% and 6%. I would like the 3-6% area filled in so that a I can show if a line falls between this range over the course of 5 years. Is something like this possible? Thanks

Hi again

I'm not sure exactly what your needs are but

- Jon Peltier's article seems to me to be a good general solution for the "band painting"

- Your case seems very simple and maybe you can use also a very simple solution

This is an example:

I have the table in C3:G8 that has 4 series:

- the lower boundary of the band
- the upper boundary of the band
- 2 cases that you want to check against the band

The way I did it was:

- used the first 2 series as stacked area chart type series. This creates the band
- used the 2 last series as line series. This displays the series relative to the band

To build the char I created an auxilliary table in I3:M8

As you can see the only difference is in the values in the upper boundary of the band. Since I'm using a stacked area chart to paint the band the second series in the auxilliary table is the difference between the second series and the first series in the original table.

I then just selected I3:M8 and inserted a stacked area chart.

Then:

- selected series 4 and changed its type to line chart
- selected series 3 and changed its type to line chart
- changed the Y axis max and min values
- formatted the series (colours of lines, areas, markers)

and got the chart below.

Last edited:
P. S. The X axis values are, of course, excel date values, in this case the 1st day of each year.

Ex.: 2012 is the value 2012-01-01 formatted with yyyy

This is exactly what I was looking for! Ok, one more challenge for you... how about adding a second "band" starting from a different number (let's say 1.1) in 2013 showing 3-6% growth from that number? End product would have two shaded bands...one starting in 2012 (like you have) and one starting in 2013 using a different number. Possible?

Thanks again for all your help!

Replies
3
Views
344
Replies
7
Views
216
Replies
3
Views
235
Replies
1
Views
453
Replies
2
Views
271

1,212,055
Messages
6,105,643
Members
447,974
Latest member
misspancake

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browserâ€™s toolbar.
2)Click on the icon in the browserâ€™s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browserâ€™s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browserâ€™s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browserâ€™s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back