Highlight and Label point on XY graph - Excel 2007

Imgonna

New Member
Joined
Jan 27, 2013
Messages
15
Hi

Working with a data set of schools in Wales - I have an XY graph showing (for example) free school meals (x) and results (y) for up to 200 schools. << The data is pulled via JSON from a government site - and all works well.

I want to be able to click / double click a point on the XY graph - have it change colour / size and display on the graph a label corresponding to the school.

I can find examples to label all the points permanently - no can do, Tushar Mehta's example to pop up when hovered (but I can't remove the 1pt holder text).

I thought this would be a simple ask - but it's totally defeating me.

Data:

A
B
C
1
School Name
FSM
Attendance
2
School A
34.2
98.2
3
School B
23.6
89.1
4
School C
45.7
87.1

<tbody>
</tbody>


My chart on a separate sheet uses B2:C4 (for example)

I'm OK with VBA and use macros - but can not access .exe packaged addins.

Data may be in different columns, but the school name will always be in column A.

Help / advice greatly recieved.

Excel 2007 due to corporate intertia.

Cheers
Glen
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Hi

Not quite what I was looking for - but a start.

This chart code pops up a message box with the cell details and the name from the worksheet:

Code:
Private Sub Chart_Select(ByVal ElementID As Long, ByVal Arg1 As Long, ByVal Arg2 As Long)
Dim xrange As Integer
Dim yrange As Integer
xrange = 2
If ElementID = xlSeries Then
    If Arg2 > 0 Then
    yrange = Arg2 + 1
     x = Worksheets("Sheet1").Cells(yrange, xrange).Value
        MsgBox "X = " & WorksheetFunction.Index _
                (SeriesCollection(Arg1).XValues, Arg2) & vbCrLf _
            & "Y = " & WorksheetFunction.Index _
                (SeriesCollection(Arg1).Values, Arg2) & vbCrLf & vbCrLf _
            & x
            
    End If
End If
End Sub

This >> pulls the school name: x = Worksheets("Sheet1").Cells(yrange, xrange).Value
 
Upvote 0
where are your x and y values in the table? is B x and C Y? is A meant for Labels?
 
Upvote 0

Forum statistics

Threads
1,216,110
Messages
6,128,896
Members
449,477
Latest member
panjongshing

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