A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Charts and Charting
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

data labels in xy scatter



 
 
Thread Tools Display Modes
  #1  
Old December 20th, 2004, 04:21 PM
kbpratt
external usenet poster
 
Posts: n/a
Default data labels in xy scatter

Hello-

Is there any way to label individual points in an XY scatter with data from
ajdacent cells? For exampl, I have 3 columns with a name, an x value and a y
value. I want to plot points with the XY data and label each point with the
names from the first column. Seems simple but I can't figure it out
  #2  
Old December 20th, 2004, 04:33 PM
Barb Reinhardt
external usenet poster
 
Posts: n/a
Default

I use Rob Bovey's XY Chart Labeler when I want to do this.

http://www.appspro.com/Utilities/ChartLabeler.htm


"kbpratt" wrote in message
...
Hello-

Is there any way to label individual points in an XY scatter with data

from
ajdacent cells? For exampl, I have 3 columns with a name, an x value and a

y
value. I want to plot points with the XY data and label each point with

the
names from the first column. Seems simple but I can't figure it out



  #3  
Old December 21st, 2004, 04:11 PM
John Mansfield
external usenet poster
 
Posts: n/a
Default

kbpratt,

In addition to Rob's XY Chart Labeler addin, you can also use the following
macro:

Sub AddLabels()
Dim RngLabels As Range
Dim Ser As Series
Dim i As Long
If TypeName(Selection) = "Series" Then
Set Ser = Selection
Set RngLabels = Application.InputBox(prompt:="Select the label
range:", Type:=8)
Ser.HasDataLabels = True
For i = 1 To Ser.Points.Count
Ser.Points(i).DataLabel.Text = RngLabels(i)
Next i
Else
MsgBox "Select a series in a chart."
End If
End Sub

In the dialog box, add the reference to the data source like "Sheet1!A1:A5".

----
Regards,
John Mansfield
http://www.pdbook.com


"kbpratt" wrote:

Hello-

Is there any way to label individual points in an XY scatter with data from
ajdacent cells? For exampl, I have 3 columns with a name, an x value and a y
value. I want to plot points with the XY data and label each point with the
names from the first column. Seems simple but I can't figure it out

  #4  
Old October 10th, 2005, 02:25 PM
cradino
external usenet poster
 
Posts: n/a
Default

John Mansfield
I'm interested in this matter and I tested your sugestion but it gives
Sintax Error
on this instruction: Set RngLabels = Application.InputBox(prompt:="Select
the label
range:", Type:=8)
Can it be because I'm workin with Portuguese version of MS EXcel 2003?
What can I do?
--
Arcindo RA Lucas


"John Mansfield" escreveu:

kbpratt,

In addition to Rob's XY Chart Labeler addin, you can also use the following
macro:

Sub AddLabels()
Dim RngLabels As Range
Dim Ser As Series
Dim i As Long
If TypeName(Selection) = "Series" Then
Set Ser = Selection
Set RngLabels = Application.InputBox(prompt:="Select the label
range:", Type:=8)
Ser.HasDataLabels = True
For i = 1 To Ser.Points.Count
Ser.Points(i).DataLabel.Text = RngLabels(i)
Next i
Else
MsgBox "Select a series in a chart."
End If
End Sub

In the dialog box, add the reference to the data source like "Sheet1!A1:A5".

----
Regards,
John Mansfield
http://www.pdbook.com


"kbpratt" wrote:

Hello-

Is there any way to label individual points in an XY scatter with data from
ajdacent cells? For exampl, I have 3 columns with a name, an x value and a y
value. I want to plot points with the XY data and label each point with the
names from the first column. Seems simple but I can't figure it out

  #5  
Old December 8th, 2005, 05:11 PM posted to microsoft.public.excel.charting
external usenet poster
 
Posts: n/a
Default data labels in xy scatter

John,
I have created the macro (which works beautifully) and want to know if the
following is possible:

For an x-y chart with the following points:

x y
A 1 5
B 2 10
C 3 12
D 4 30

Is it possible to get the data label for each point in the graph to read:
(for C, as an example)

C
3
12

Many thanks,
M John







"John Mansfield" wrote:

kbpratt,

In addition to Rob's XY Chart Labeler addin, you can also use the following
macro:

Sub AddLabels()
Dim RngLabels As Range
Dim Ser As Series
Dim i As Long
If TypeName(Selection) = "Series" Then
Set Ser = Selection
Set RngLabels = Application.InputBox(prompt:="Select the label
range:", Type:=8)
Ser.HasDataLabels = True
For i = 1 To Ser.Points.Count
Ser.Points(i).DataLabel.Text = RngLabels(i)
Next i
Else
MsgBox "Select a series in a chart."
End If
End Sub

In the dialog box, add the reference to the data source like "Sheet1!A1:A5".

----
Regards,
John Mansfield
http://www.pdbook.com


"kbpratt" wrote:

Hello-

Is there any way to label individual points in an XY scatter with data from
ajdacent cells? For exampl, I have 3 columns with a name, an x value and a y
value. I want to plot points with the XY data and label each point with the
names from the first column. Seems simple but I can't figure it out

  #6  
Old December 10th, 2005, 05:04 PM posted to microsoft.public.excel.charting
external usenet poster
 
Posts: n/a
Default data labels in xy scatter

In the next column, construct the text of the desired labels. An example
formula would be

=A2&CHAR(10)&B2&CHAR(10)&C2

where CHAR(10) is a carriage return. Use these constructed labels as the
data labels.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______


"M John" wrote in message
...
John,
I have created the macro (which works beautifully) and want to know if the
following is possible:

For an x-y chart with the following points:

x y
A 1 5
B 2 10
C 3 12
D 4 30

Is it possible to get the data label for each point in the graph to read:
(for C, as an example)

C
3
12

Many thanks,
M John







"John Mansfield" wrote:

kbpratt,

In addition to Rob's XY Chart Labeler addin, you can also use the
following
macro:

Sub AddLabels()
Dim RngLabels As Range
Dim Ser As Series
Dim i As Long
If TypeName(Selection) = "Series" Then
Set Ser = Selection
Set RngLabels = Application.InputBox(prompt:="Select the label
range:", Type:=8)
Ser.HasDataLabels = True
For i = 1 To Ser.Points.Count
Ser.Points(i).DataLabel.Text = RngLabels(i)
Next i
Else
MsgBox "Select a series in a chart."
End If
End Sub

In the dialog box, add the reference to the data source like
"Sheet1!A1:A5".

----
Regards,
John Mansfield
http://www.pdbook.com


"kbpratt" wrote:

Hello-

Is there any way to label individual points in an XY scatter with data
from
ajdacent cells? For exampl, I have 3 columns with a name, an x value
and a y
value. I want to plot points with the XY data and label each point
with the
names from the first column. Seems simple but I can't figure it out



  #7  
Old December 12th, 2005, 01:12 PM posted to microsoft.public.excel.charting
external usenet poster
 
Posts: n/a
Default data labels in xy scatter

Works like a charm. Many thanks.

M John

"Jon Peltier" wrote:

In the next column, construct the text of the desired labels. An example
formula would be

=A2&CHAR(10)&B2&CHAR(10)&C2

where CHAR(10) is a carriage return. Use these constructed labels as the
data labels.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______


"M John" wrote in message
...
John,
I have created the macro (which works beautifully) and want to know if the
following is possible:

For an x-y chart with the following points:

x y
A 1 5
B 2 10
C 3 12
D 4 30

Is it possible to get the data label for each point in the graph to read:
(for C, as an example)

C
3
12

Many thanks,
M John







"John Mansfield" wrote:

kbpratt,

In addition to Rob's XY Chart Labeler addin, you can also use the
following
macro:

Sub AddLabels()
Dim RngLabels As Range
Dim Ser As Series
Dim i As Long
If TypeName(Selection) = "Series" Then
Set Ser = Selection
Set RngLabels = Application.InputBox(prompt:="Select the label
range:", Type:=8)
Ser.HasDataLabels = True
For i = 1 To Ser.Points.Count
Ser.Points(i).DataLabel.Text = RngLabels(i)
Next i
Else
MsgBox "Select a series in a chart."
End If
End Sub

In the dialog box, add the reference to the data source like
"Sheet1!A1:A5".

----
Regards,
John Mansfield
http://www.pdbook.com


"kbpratt" wrote:

Hello-

Is there any way to label individual points in an XY scatter with data
from
ajdacent cells? For exampl, I have 3 columns with a name, an x value
and a y
value. I want to plot points with the XY data and label each point
with the
names from the first column. Seems simple but I can't figure it out




  #8  
Old November 21st, 2006, 09:16 PM posted to microsoft.public.excel.charting
Grego
external usenet poster
 
Posts: 7
Default data labels in xy scatter

Is there any solution like this for labellin scatter graphs but for those
built with MS Graph in powerpoint instead? (I mean besides building it in
excel and then pasting in on the ppt slide)
many thanks.

"M John" wrote:

Works like a charm. Many thanks.

M John

"Jon Peltier" wrote:

In the next column, construct the text of the desired labels. An example
formula would be

=A2&CHAR(10)&B2&CHAR(10)&C2

where CHAR(10) is a carriage return. Use these constructed labels as the
data labels.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______


"M John" wrote in message
...
John,
I have created the macro (which works beautifully) and want to know if the
following is possible:

For an x-y chart with the following points:

x y
A 1 5
B 2 10
C 3 12
D 4 30

Is it possible to get the data label for each point in the graph to read:
(for C, as an example)

C
3
12

Many thanks,
M John







"John Mansfield" wrote:

kbpratt,

In addition to Rob's XY Chart Labeler addin, you can also use the
following
macro:

Sub AddLabels()
Dim RngLabels As Range
Dim Ser As Series
Dim i As Long
If TypeName(Selection) = "Series" Then
Set Ser = Selection
Set RngLabels = Application.InputBox(prompt:="Select the label
range:", Type:=8)
Ser.HasDataLabels = True
For i = 1 To Ser.Points.Count
Ser.Points(i).DataLabel.Text = RngLabels(i)
Next i
Else
MsgBox "Select a series in a chart."
End If
End Sub

In the dialog box, add the reference to the data source like
"Sheet1!A1:A5".

----
Regards,
John Mansfield
http://www.pdbook.com


"kbpratt" wrote:

Hello-

Is there any way to label individual points in an XY scatter with data
from
ajdacent cells? For exampl, I have 3 columns with a name, an x value
and a y
value. I want to plot points with the XY data and label each point
with the
names from the first column. Seems simple but I can't figure it out




  #9  
Old November 21st, 2006, 10:10 PM posted to microsoft.public.excel.charting
Andy Pope
external usenet poster
 
Posts: 2,088
Default data labels in xy scatter

Hi,

Not that I know of.
But I have some code in this example.
http://www.andypope.info/ngs/ng16.htm

Cheers
Andy

Grego wrote:
Is there any solution like this for labellin scatter graphs but for those
built with MS Graph in powerpoint instead? (I mean besides building it in
excel and then pasting in on the ppt slide)
many thanks.

"M John" wrote:


Works like a charm. Many thanks.

M John

"Jon Peltier" wrote:


In the next column, construct the text of the desired labels. An example
formula would be

=A2&CHAR(10)&B2&CHAR(10)&C2

where CHAR(10) is a carriage return. Use these constructed labels as the
data labels.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______


"M John" wrote in message
...

John,
I have created the macro (which works beautifully) and want to know if the
following is possible:

For an x-y chart with the following points:

x y
A 1 5
B 2 10
C 3 12
D 4 30

Is it possible to get the data label for each point in the graph to read:
(for C, as an example)

C
3
12

Many thanks,
M John







"John Mansfield" wrote:


kbpratt,

In addition to Rob's XY Chart Labeler addin, you can also use the
following
macro:

Sub AddLabels()
Dim RngLabels As Range
Dim Ser As Series
Dim i As Long
If TypeName(Selection) = "Series" Then
Set Ser = Selection
Set RngLabels = Application.InputBox(prompt:="Select the label
range:", Type:=8)
Ser.HasDataLabels = True
For i = 1 To Ser.Points.Count
Ser.Points(i).DataLabel.Text = RngLabels(i)
Next i
Else
MsgBox "Select a series in a chart."
End If
End Sub

In the dialog box, add the reference to the data source like
"Sheet1!A1:A5".

----
Regards,
John Mansfield
http://www.pdbook.com


"kbpratt" wrote:


Hello-

Is there any way to label individual points in an XY scatter with data
from
ajdacent cells? For exampl, I have 3 columns with a name, an x value
and a y
value. I want to plot points with the XY data and label each point
with the
names from the first column. Seems simple but I can't figure it out



  #10  
Old March 20th, 2007, 06:47 PM posted to microsoft.public.excel.charting
rockhammer
external usenet poster
 
Posts: 20
Default data labels in xy scatter

Hi John or whoever's monitoring this,

I'm trying to use this macro but every time I select the data series (or I
think I have selected the data series), TypeName(Selection) is returning
"ChartObject" and I get the msgbox every time. Indeed, every time the macro
exits, the chart is selected.

I have tried selecting the data series by right clicking on the dots of the
data series and have also tried selecting it via the drop down menu in the
chart toolbar. Same result.

Your help would be much appreciated. Thanks.

Patrick.


"John Mansfield" wrote:

kbpratt,

In addition to Rob's XY Chart Labeler addin, you can also use the following
macro:

Sub AddLabels()
Dim RngLabels As Range
Dim Ser As Series
Dim i As Long
If TypeName(Selection) = "Series" Then
Set Ser = Selection
Set RngLabels = Application.InputBox(prompt:="Select the label
range:", Type:=8)
Ser.HasDataLabels = True
For i = 1 To Ser.Points.Count
Ser.Points(i).DataLabel.Text = RngLabels(i)
Next i
Else
MsgBox "Select a series in a chart."
End If
End Sub

In the dialog box, add the reference to the data source like "Sheet1!A1:A5".

----
Regards,
John Mansfield
http://www.pdbook.com


"kbpratt" wrote:

Hello-

Is there any way to label individual points in an XY scatter with data from
ajdacent cells? For exampl, I have 3 columns with a name, an x value and a y
value. I want to plot points with the XY data and label each point with the
names from the first column. Seems simple but I can't figure it out

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Source issues. ??data.access.pages Phil Database Design 2 October 11th, 2004 02:42 AM
data labels not linked to data source viveleroi0 Charts and Charting 8 August 19th, 2004 02:12 AM
data labels for an excel scatter chart dave c Charts and Charting 1 August 11th, 2004 03:49 PM
Scatter plot changes to line plot with data gaps Jim Charts and Charting 14 October 8th, 2003 05:10 PM


All times are GMT +1. The time now is 11:16 PM.


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