Richard Schollar
MrExcel MVP
- Joined
- Apr 19, 2005
- Messages
- 23,707
Given a data table like the following:
I can produce a nice simple line chart that plots both the Sales lines and the CostOfSales lines (values on the Y axis, timeline on the X axis)- that's no problem.
But supposing I have an event (eg a business acquisition) that I want to mark out on my chart (eg because it materially affects the sales/cost of sales numbers), and given that I have the date of this event and a label stating what this event is in two cells, is there some way I can plot this event on my graph? Specifically, I'd like to see eg a vertical line thru the date axis (X axis) at the point the event occured with a descriptive text label next to it (eg at the top, so it isn't getting in the way of the chart).
I need to automate this as much as possible as I have c. 500 charts to produce, each with a relevant event.
Can anyone help?
Thanks in advance
Book1 | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | Date | Sales | CostOfSales | |||
2 | 01/01/2007 | 95 | 65 | |||
3 | 01/02/2007 | 100 | 68 | |||
4 | 01/03/2007 | 75 | 50 | |||
5 | 01/04/2007 | 65 | 45 | |||
6 | 01/05/2007 | 80 | 61 | |||
7 | 01/06/2007 | 100 | 71 | |||
8 | 01/07/2007 | 150 | 103 | |||
9 | 01/08/2007 | 135 | 97 | |||
10 | 01/09/2007 | 125 | 94 | |||
11 | 01/10/2007 | 90 | 63 | |||
12 | 01/11/2007 | 60 | 45 | |||
13 | 01/12/2007 | 62 | 41 | |||
Sheet1 |
I can produce a nice simple line chart that plots both the Sales lines and the CostOfSales lines (values on the Y axis, timeline on the X axis)- that's no problem.
But supposing I have an event (eg a business acquisition) that I want to mark out on my chart (eg because it materially affects the sales/cost of sales numbers), and given that I have the date of this event and a label stating what this event is in two cells, is there some way I can plot this event on my graph? Specifically, I'd like to see eg a vertical line thru the date axis (X axis) at the point the event occured with a descriptive text label next to it (eg at the top, so it isn't getting in the way of the chart).
I need to automate this as much as possible as I have c. 500 charts to produce, each with a relevant event.
Can anyone help?
Thanks in advance
