# Microsoft Office Application Help - Excel Help forum > Excel Charting & Pivots >  >  Need Vertical Line on XY Scatter Chart

## rickh1001

I have an XY scatter chart showing the relationship between % organic and the retention time of compounds on an HPLC.  I have the user select a given % organic on the X axis.  I would like to display a vertical line on the chart at the selected % organic on the X axis.  I can scale the Y axis to the min/max of the values.  So how can I do a combo chart or whatever, to overlay a vertical line to the scale of the chart, at the X axis selected % organic?

----------


## MrShorty

When i do this, I:

1) Enter my %organic value in a convenient cell (for convenience, how about X1). Make a copy/link in the cell below X2 =X1
2) Enter two reasonable values for the Y values of the vertical line. 0 and 10 in Y1 and Y2 (if I assume the retention times are never larger than 10 minutes).
3) Add these 4 cells as a new data series in the scatter chart (Select Data dialog is often the "easiest" if you are unfamiliar with the strategies for adding data series to a chart). If it isn't obvious, X1:X2 becomes the X values for the new series and Y1:Y2 becomes the Y values for the new series.
4) Format the new series to look how I want (usually I want no marker, with a solid line in an easily visible color like black or blue or red).

Will something like that work for you?

----------


## rickh1001

Mr. Shorty, 

Thank you for the fast reply.  Brilliant, and it worked perfectly!  The X value is input by the user into a cell, and I copy it into two cells.  The Y values are the min and max of the data set.  I get a perfect line showing the selected % organic drawn to the Y scale of the graph. 

Thanks again!

----------

