How do I get 2 vertical lines in a graph?


Posted by Stacey Nagle on March 15, 2000 12:13 PM

I am currently working on a line graph that shows monthly overall data as well as a specific project data. The problem I am having is that I want to represent the project timeframe by two vertical lines on my chart. For instance, the chart goes from Sept-Sept, but I only need a line on both December and March. Drop down lines will go for every month, not just the ones I want. For the meantime I have manually drawn in these lines, but every time I add in/adjust new data the chart size changes, thereby throwing off the line alignment. If anyone can help get these two lines automated, I would much appreciate it. Thanks

Posted by judi on March 15, 2000 2:14 PM

Stacey,

Here is a method that might work:

1) create a column next to the data series for project duration. For instance if your dates are in column A and your data series in column B create a column C which will list the project duration

2) If you project runs from dec to mar then put 100 in column C for each of the date between that time period and 0 for all others

3) Create a chart selecting the custom chart types built into Excel. Select line - column on 2 axes

4) The line should represent the data series and the bars your project duration.

5) Format the chart so that the scale for the bars (the secondary axis) is from 0 to 100 (you can hide the tick marks and scale by selecting those options under format axis)

6) Format the data series for the project duration (the bars) On the patterns tab select Borders none and select an appropriate color, on the options tab set Gap to 0

You should now have a chart that has a shaded area for your project duraton. It is not lines like you requested, but it is the same idea.

Hope this helps.

If I was too confusing post again and I will try to clear it up.

Posted by Stacey on March 16, 2000 6:16 AM

Not able to do that...

Those comments were great, but I must apologize. I should have mentioned that I am using Excel 95 and I don't think there is an option to have a line-column chart on 2 axes. If there is, please let me know how to get to it. Thanks

Stacey



Posted by Stacey on March 16, 2000 8:04 AM

Fixed It! Much different way, though

With the help of some other advice I was able to get exactly what I wanted. Here's how:

I created another data series and inputed the highest y axis value I'll need. This created a point at the very top of my graph. From there I formatted a minus error bar 100% and then changed the width to where I needed it, and Viola! I had what I needed- vertical lines from the top of my graph to the bottom at two locations. I do appreciate your advice, though- we are getting Excel 2000 in the summer and I'll be using your help with other things I work on (I can see the usefulness of it). Thanks a bunch!

Stacey