Add Date Line to Bar Chart

south0085

Board Regular
Joined
Aug 15, 2011
Messages
141
I have a basic bar chart. The x axis has years. From 2004 to 2017. The Y axis has qty shipped. (manufacturing plant)

I want to add a line in there to show the year that the model was discontinued. I would like to have that as a visual so that we can see how the shipments really drop off once the model goes into service production (meaning: after the end of it's regular life).

I hope I explained this correctly. I will gladly email my sheet to anyone, if needed.

Is there a dropbox or somewhere that I can drop my files, to show you guys?

Thank you for your time.
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Can you add a second series with only one data point - the year the model was discontinued and a really high number for the qty shipped?
 
Upvote 0
Can you add a second series with only one data point - the year the model was discontinued and a really high number for the qty shipped?

I actually thought about doing that. But I actually have lots of different models used in the data range. I have a drop-down list at the top of my sheet. I select a model and it displays that info on the graph. And each model has a different "end of life" date.
 
Upvote 0
I figured out how to post a screenshot:

Excel Workbook
BCDEFGHIJKLMNOPQ
7Selection2
8
920042005200620072008200920102011201220132014201520162017
10QW Service2733348104331044510099776778749439779977437955663165443775
11
12
13123456789101112131415
14
15Program20042005200620072008200920102011201220132014201520162017EOL
16QW Service27333481043310445100997767787494397799774379556631654437752004
17416A Service00000000217247214282180263217612012
18642L Service00000104020083147302730152910230818258342011
19397L Service00000143528654981777899931139010517882855022010
20989A Service000000000001691259953192013
21635N Service91838284876713391317148802382717243664760915168404127522009
22TK8X Service000000000000002016
Data
 
Upvote 0
Try this... in cell C11

=IF(VLOOKUP($B10,$B$16:$Q$25,MATCH("EOL",$B$15:$W$15,0),FALSE)=C9,MAX($C$10:$P$10)+1000,"")

and copy this to all cells to the right.
add this row as a series to your chart.
what this formula does:
vlookup to find the Program name, then finds the year value in the EOL column,
compares this year to the year number in row 9 and
if it matches it puts a number that is 1000 more than the maximum number in row 10,
otherwise it puts in an empty string "".
 
Upvote 0
Another option for sizing the value - instead of adding 1000 (which may make the value WAY bigger than some of the program maxes) would be to multiply by 1.1 (adding 10%). This might make the chart look better without having to fix the max axis value.
 
Upvote 0
One last thing... I used the "Match" function, finding "EOL" so that if you need to insert another year's information, you won't need to modify the formula.
 
Upvote 0
Another option for sizing the value - instead of adding 1000 (which may make the value WAY bigger than some of the program maxes) would be to multiply by 1.1 (adding 10%). This might make the chart look better without having to fix the max axis value.


Thank you. I changed it to add 10 percent. Great idea.
 
Upvote 0

Forum statistics

Threads
1,215,984
Messages
6,128,110
Members
449,421
Latest member
AussieHobbo

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
Back
Top