Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 54
Default Update a chart using Hyperlinks

Thanks Andy. I'll give this a try!

"Andy Pope" wrote:

Assuming Sheet1 contains a chart and the range A1:A3 contains 3 descriptions
of the data you want to display.
Select a cell will cause the routine to run. If that cell is in the range
A1:A3 then the chart source data will be changed.

You will need to update the references for the charts data source to suit.

'----------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

If Not Intersect(Range("A1:A3"), Target) Is Nothing Then

Select Case Target.Address
Case "$A$1"
ActiveSheet.ChartObjects(1).Chart.SetSourceData _
Source:=Sheets("Sheet1").Range("N17:O19"), PlotBy:=xlColumns
Case "$A$2"
ActiveSheet.ChartObjects(1).Chart.SetSourceData _
Source:=Sheets("Sheet2").Range("F6:G11"), PlotBy:=xlColumns
Case "$A$3"
ActiveSheet.ChartObjects(1).Chart.SetSourceData _
Source:=Sheets("Sheet3").Range("B28:C34"), PlotBy:=xlColumns
End Select
End If

End Sub
'------------------

Cheers
Andy
--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Access Joe" wrote in message
...
Thanks Andy. Would you be able to tell me how to go about using the
Worksheet_SelectionChange event? Unfortunately, the data ranges would
always
be different on each worksheet...and I'm not familiar with writing code
for
that.

Any more details you could provide would be most helpful.

"Andy Pope" wrote:

Hi,

You could use the Worksheet_SelectionChange event to update the summary
chart data.

If your chart data is located in the same place on various sheets then a
INDIRECT formula could be used.
Otherwise use use code to copy values.

Cheers
Andy
--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Access Joe" wrote in message
...
Hi all: PC Excel 2003

I have a Summary sheet that lists a bunch of drug names in Column A.
To
the
right of that column is one big Chart (just one). Now what I'm looking
for
is a way to create some kind of "hyperlink Macro" so that when I click
on
a
specific Drug name in Column A, the big chart on the right will show
data
for
that drug.

Remember this is a summary sheet. All the data for each drug is spread
out
across multiple worksheets...to which i could easily create charts on
each
one if I wanted to. But I don't want someone to go TO those
worksheets.
I
want them to remain on the Summary Sheet, click the desired drug in
Column
A,
and see the chart for that selected drug right there on the same
summary
sheet.

Hope this makes sense. Can anyone help?
Joe




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
Want to update hyperlinks through multiple sheets but can't Billznik Excel Worksheet Functions 1 February 28th 12 06:19 AM
Update one cell with many hyperlinks poorboys Excel Discussion (Misc queries) 1 January 19th 08 12:40 PM
Update 2000 Excel hyperlinks to 2003 hyperlinks lonv155 Excel Worksheet Functions 4 October 25th 07 05:51 AM
chart from pivot data does not update x-axis bar chart values - bug jason gers Excel Discussion (Misc queries) 0 April 3rd 07 06:34 PM
Can hyperlinks be created in an organization Chart basilb Charts and Charting in Excel 1 October 4th 06 08:35 AM


All times are GMT +1. The time now is 05:01 AM.

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

About Us

"It's about Microsoft Excel"