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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - Chart Representation of data 1

Status
Not open for further replies.

beanxx

Technical User
Jul 9, 2002
61
0
0
GB
Sure there is a simple answer to this......
Basically I have a chart whereby a count for each month is represented by indivdual bars to represent the 12 month's Jan - Dec. However I would like to superimpose a line graph on top of this. Is it possible to represent two lots of data on the same graph where each is presented in a different format (i.e. bar and line) and if so how???

Thanks,

Justin
 
Hi,
If I understand your question correctly, this is called "plotting a series on a secondary axis". In Excel XP, highlight data | click on Chart Wizard | click on Custom types tab | select "Line Column on two axes". Continue through the wizard.

Hope this helps.


Best,
Kathy [2thumbsup]
BlueHorizon
 
Hi,

The easiest way to ADD a series to your chart is...

1. first add a column or row for the data in your new series -- the data elements should correspond to the existing Category Series

2. copy the new data range (with or without the heading for the range), then select the chart, menu item Edit/Paste Special with the appropriate selection

3. with the new series selected, menu item Chart/Chart Type and select the type of chart for the selected series.

:)

Skip,

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Skip,

Followed your process.....which as required superimposes the second set of chart data on top of the original chart data. Trouble is that whgen I go to "Chart/Chart Type" and make my selection both the new and original data are convereted to line graphs when I wanted the original set of data to remain as a bar chart......probably me being a bit thick but have you any ideas?

Thanks,

Justin
 
Beanxx,

make sure you have just one of the series selected before you do "Chart/Chart Type", so that just that series is affected by the command.

Click on the required series with your mouse, or use the up and down arrows to navigate through the chart objects until the required series is selected.

Cheers, Glenn.
 
NOTE...

"3. with the new series selected, menu item Chart/Chart Type and select the type of chart for the selected series"

Skip,

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Tried all of the above but regardless of selecting one series of data, the new format is applied to both sets of data. I must be missing something pretty fundamental???

Justin
 
Justin,

1. a single series must be selected.

2. while STILL IN THE CHART, with the single series selected, menu item Chart/Chart Type and make selection.

Skip,

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Skip,

Thanks for this but appear to make little difference...perhaps I could mail my worksheet for closer analysis?

Thanks for all your assistance,

Justin
 
Skip,

Thanks and I have forwarded the spreadsheet.

Much appreciated,

Justin
 
Skip,

I Did e-mail the following response......

"Can't thank you enough for this.....solving my problem with adding the line graph was more than I could have hoped for, but the AdjustChartAxis routine is fantastic, even more so when you consider you have got the adjustment linked to listbox control.

Incidentally I believe the problem with adding the second chart type as a line graph was due to the fact that I was selecting a line graph from the "Custom Types" rather than the "Standard Types" and I don't think that this is allowed, although I could be wrong?

Incidentally while I can find the AdjustChartAxis macro routine, how do I access the Worksheet_Activate code which activates this routine? The reason being that this is such a great script I would like to apply upper/lower limits to all the charts. Sorry to ask stupid questions, but unfortunately I'm not expert, unlike yourself :)"

Off course I have issued you a star for your valuable assistance although you deserve al least ten!

Thanks once again,

Justin
 
Justin,

Glad it is working for you.

Activate the VB Editor (alt+F11) or right click the sheet tab and select View Code.

The latter method takes you to that sheet's object code. Above the code window are 2 comboboxes. The left box is the select the code associated with objects (controls and worksheet) or the code not associated with any object - General. In the lower left-hand corner of the window frame are 2 buttons that control how code is displayed. Choose your poison.

If you cane into the VB Editor some other way, open the Project Explorer to view the various code objects. select the sheet object of your choice, double click or right click and select view code.

Please post send the workbook to me again

this time at

skip @ theofficeexperts.com

I will mod the AdjustAxis code to make it able to be used on other sheets/charts. :)

Skip,

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top