Forum Discussion
Line chart
- Jun 17, 2021
Varun_Aggarwal The data in you picture doesn't seem to correspond with the graph, but perhaps the attached file has what you asked for.
First add a column with the P&L figure, only for the row with the current price. All others need to be #N/A.
Then create a scatter chart and add vertical error bars for the "current price" series as described in the article referred to by StoneKiwi
Now select the P&L series and change the chart type to a line.
Hi,
You need a table with 3 columns:
The 'Period' should be the date/time period, 'Price' is the price at that time period, 'Current Price' is a calculated column showing the current price. The current price column will add an additional line to the graph showing a current price line.
StoneKiwi Thanks for your reply. Basically, as I have mentioned in my mail, this is a Profit and Loss (P&L) graph. I have attached the image that what I am looking at.
X-axis (horizontal) - Stock Price Range
Y-axis (vertical) - P&L amount
X-axis (horizontal) - Current market price of the stock (depicting with a line).
Thank you once again for your support.
- Riny_van_EekelenJun 17, 2021Platinum Contributor
Varun_Aggarwal The data in you picture doesn't seem to correspond with the graph, but perhaps the attached file has what you asked for.
First add a column with the P&L figure, only for the row with the current price. All others need to be #N/A.
Then create a scatter chart and add vertical error bars for the "current price" series as described in the article referred to by StoneKiwi
Now select the P&L series and change the chart type to a line.
- Varun_AggarwalJun 27, 2021Copper Contributor
Thanks you. Riny_van_Eekelen
- StoneKiwiJun 17, 2021Iron ContributorRefer to here:
https://www.ablebits.com/office-addins-blog/2019/05/15/add-vertical-line-excel-chart/