Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
Tim L Cole Haan
 
Posts: n/a
Default How do I plot two columns of data as one data point/marker in a ch

I want to plot a series of results into a chart as one data point. To
clarify, I have multiple rows with three colums of data. I would like each
row (column one being the Series title column) to be one data point (i.e. Row
One = Store 1, Column 1 = "Store 1", Column 2 = Sales $'s, Column 3 = Profit
%). On the chart I would like the X-Axis to be Profit % and the Y-Axis to be
Sales $'s. The example above, using typical charting functions, results in
two data points for Store 1 (the Sales $ plotted as one point and the Profit
% plotted as another point). I only want one data point where the Sales $
and Profit % meet (i.e. the way you would plot when you were learning
charts/graphs as a kid).

I have found a work around, but it requires manually setting up each Row of
data as its own series and the corresponding name, X and Y Axis variables.

It would be nice if this set-up could be done without so much manual
intervention.

I'm using Excel 2003.

Thanks in advance for any help you can offer!
  #2   Report Post  
Posted to microsoft.public.excel.charting
Tushar Mehta
 
Posts: n/a
Default How do I plot two columns of data as one data point/marker in a ch

The only solution I can think of requires VBA. Keep in mind that I
would not implement a solution meant for distribution using the method
below. But, it is the easiest way to get a prototype done.

In the worksheet's code module, put the code below. Then, every time
you select a cell containing data in columns C1:C3 the chart will be
updated.

The code assumes there is only one chart in the worksheet and that it
contains only one series. The name comes from column C1, the x value
from column C2 and the y value from C3.

Option Explicit

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count < 1 Then Exit Sub
If Target.Column 3 Then Exit Sub
If IsEmpty(Target.Value) Then Exit Sub
Application.EnableEvents = False
On Error Resume Next
Dim aSeries As Series
Set aSeries = _
Target.Parent.ChartObjects(1).Chart.SeriesCollecti on(1)
With Target.Parent
aSeries.Name = .Cells(Target.Row, 1)
aSeries.XValues = .Cells(Target.Row, 2)
aSeries.Values = .Cells(Target.Row, 3)
End With
Application.EnableEvents = True
End Sub


--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article , =?Utf-
8?B?VGltIEwgQ29sZSBIYWFu?= <Tim L Cole
says...
I want to plot a series of results into a chart as one data point. To
clarify, I have multiple rows with three colums of data. I would like each
row (column one being the Series title column) to be one data point (i.e. Row
One = Store 1, Column 1 = "Store 1", Column 2 = Sales $'s, Column 3 = Profit
%). On the chart I would like the X-Axis to be Profit % and the Y-Axis to be
Sales $'s. The example above, using typical charting functions, results in
two data points for Store 1 (the Sales $ plotted as one point and the Profit
% plotted as another point). I only want one data point where the Sales $
and Profit % meet (i.e. the way you would plot when you were learning
charts/graphs as a kid).

I have found a work around, but it requires manually setting up each Row of
data as its own series and the corresponding name, X and Y Axis variables.

It would be nice if this set-up could be done without so much manual
intervention.

I'm using Excel 2003.

Thanks in advance for any help you can offer!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
extracting data from a spreadsheet by searching on columns Tom New Users to Excel 3 October 24th 05 10:36 PM
Data in narrow columns truncated when saving as DBF Ben Amada Excel Discussion (Misc queries) 2 October 11th 05 11:23 PM
chart data series -- plot a table as a single series hjc Charts and Charting in Excel 7 September 20th 05 05:52 PM
Dealing with data in several columns AND rows RJPerri Excel Discussion (Misc queries) 2 September 14th 05 12:57 PM
Text to Columns / Importing Data John Thomson Excel Discussion (Misc queries) 0 May 4th 05 08:21 PM


All times are GMT +1. The time now is 02:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"