How to put lines on a column chart

rdionne

New Member
Joined
Feb 21, 2002
Messages
47
I am using a column chart to display my histogram data. I need to put some vertical lines ontop of the chart to show data limits.
I tried doing this with a combination line-column chart, but I couldn't figure out how to add the vertical lines. I also tried adding a line shape object, but I don't know how to place the line at the right places.
ActiveChart.Shapes.AddLine takes it's arguments in points and the x axis range changes from chart to chart. Help please.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
I figured it out. Say my data series goes from 20 to 80, plotarea.width=400, and I
want to place a line at 35.
Placement I want =
20 + ((35 - 20)/(80-20))*(400)= 120
Would it be better to do a combination chart than adding the shapes? I don't know how to do the combo chart.
RD
 
Upvote 0

Forum statistics

Threads
1,223,311
Messages
6,171,363
Members
452,397
Latest member
ddneptune

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