Overlaying vertical bands on a line plot

jbortfeld

Board Regular
Joined
Feb 24, 2005
Messages
67
Hi,

I'm trying to graph an economic data series (line plot) and want to overlay shaded bands that will indicate recession periods. So in the first column I have the dates, the second column is my data series and the third column is a series of binary numbers where 0 indicates no recession and 1 indicates a recession.

Is there a good way to overlay the recession bands on the data plot. I've used the line/column on two axes option but it's not the greatest.

Thanks.
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

Jon Peltier

MrExcel MVP
Joined
May 14, 2003
Messages
5,249
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
You could do something similar to the line column, but I'd start from scratch:

Make your chart with two line series. Select the series comprised of 0/1, and on the chart menu, select chart type, and choose the 100% stacked column type (top right sub type option). Double click the column series, pick a light gray fill and no border on the Patterns tab, on the Options tab, change the gap width to 0, and on the Axis tab, choose Secondary. Double click the secondary Y axis (right of chart), change the scale to min=0 and max=1 and make sure the min and max auto boxes are unchecked; on the patterns tab choose none for line, tick marks, and tick labels.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,168,117
Messages
5,857,476
Members
431,882
Latest member
saaaaaaaaaaaaaaaaaaaaaa

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Top