linking data point on chart to cell

jcg31

Board Regular
Joined
Aug 20, 2006
Messages
176
I have a scatter chart that is displaying a range of data on worksheet ("Data"). I want to be able to select a point displayed on the chart and have the corresponding cell on the worksheet ("Data") to become selected.
Would seem possible (given the link created on the chart to the data) but I can't find anything that gets me there.

Any help would be appreciated.
Jim
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Hi Jim

To do it you have to use the chart events, in this case you can

- define 2 named ranges, for the X and Y values
- use the Select event to hightlight the series or a point in the series
- use the Deactivate event to kill all the highlighting when you leave the chart

If the chart is in a chart sheet the events are available by default. If the chart is embedded in a worksheet you have to create a class to make the chart events available.

The help explains how to do it. Check the help on the chart events and also the help section "Using Events with Embedded Charts"

Remark: you should always post your excel version. An easy way not to forget it is to include it in your signature.
 
Upvote 0
Using office 2003

Found my way through, well kinda
Created a Chart Class and then in ThisWorkbook I placed the following code:

Code:
 Dim ChartObjectClass As New ChartEventClass


Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)

 On Error Resume Next
 Set ChartObjectClass.ChartObject = Worksheets("Summary").ChartObjects(1).Chart

End Sub

My new question is how do I change this code so the event affects all the ChartObjects not just ChartObject(1).

Thanks,
Jim
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,849
Members
452,948
Latest member
UsmanAli786

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