Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB charts in Excel

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
How do I take a value from a cell in Excel and make it as a horizontal line on an EXISTING chart?

I have a spreadsheet with quantitative data that is tracked across months(x axis). I put a macro button that runs VB code to create a chart on a different worksheet which charts this data in a simple bar chart with one series. However, I want to take data from a cell not in that series and make a horizontal target line. What is the code for this?
This is my first attempt at using VB in Excel. I've gotten this far using the VB help files. However the same help files seem to dance around this 'charting a target line' topic.

Any help would be appreciated. Thanks.



 
Two ways :
1) Construct a new series with the same value for each of the points in first series. Set to line graph.

2) Construct a new series with the same value for the first and last point in the first series. Set to linear trend line.

Send a message to JVFriederick@Yahoo.com and I will return an example file that uses option #2.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top