#1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 1
Default Link To Charts

Hi,

i have an excel workbook with quite a few charts in it. All the data for the
charts is stored on one sheet, is there a way of creating a hyperlink for
each set of data to the relevent chart? I dont fancy doing buttons for every
piece of data (that would work out at well over 30 buttons!)
  #2   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 2,489
Default Link To Charts

Hi,

See Jon's page for details of hyperlinks.
http://peltiertech.com/Excel/Hyperlinks.html

Cheers
Andy

Lorcan Dene wrote:
Hi,

i have an excel workbook with quite a few charts in it. All the data for the
charts is stored on one sheet, is there a way of creating a hyperlink for
each set of data to the relevent chart? I dont fancy doing buttons for every
piece of data (that would work out at well over 30 buttons!)


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
  #3   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 298
Default Link To Charts

That worked great. How would you alter the macro for multiple sheets in the
same excel file? For example, cell b2 will take you to one worksheet, b4
will take you to another worksheet, etc.

Thanks,
Richard

"Andy Pope" wrote:

Hi,

See Jon's page for details of hyperlinks.
http://peltiertech.com/Excel/Hyperlinks.html

Cheers
Andy

Lorcan Dene wrote:
Hi,

i have an excel workbook with quite a few charts in it. All the data for the
charts is stored on one sheet, is there a way of creating a hyperlink for
each set of data to the relevent chart? I dont fancy doing buttons for every
piece of data (that would work out at well over 30 buttons!)


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info

  #4   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 2,489
Default Link To Charts

Hi,

Depending on the number of links you just need to duplicate the code
changing the test range.

If you have many cells to test then maybe,

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Dim rngTestTarget As Range

For Each rngTestTarget In Range("B2,B4,B6").Cells
If Not Intersect(Target, rngTestTarget) Is Nothing Then
On Error Resume Next
Charts(Target.Value).Activate
If Err.Number < 0 Then
MsgBox "No such chart exists.", vbCritical, _
"Chart Not Found"
End If
On Error GoTo 0
Exit For
End If
Next

End Sub

Cheers
Andy

--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Rich" wrote in message
...
That worked great. How would you alter the macro for multiple sheets in
the
same excel file? For example, cell b2 will take you to one worksheet, b4
will take you to another worksheet, etc.

Thanks,
Richard

"Andy Pope" wrote:

Hi,

See Jon's page for details of hyperlinks.
http://peltiertech.com/Excel/Hyperlinks.html

Cheers
Andy

Lorcan Dene wrote:
Hi,

i have an excel workbook with quite a few charts in it. All the data
for the
charts is stored on one sheet, is there a way of creating a hyperlink
for
each set of data to the relevent chart? I dont fancy doing buttons for
every
piece of data (that would work out at well over 30 buttons!)


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info


  #5   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 298
Default Link To Charts

I found another way to do it. I put buttons in with the following code
behind each of the two buttons. The first one moves over one sheet the
second moves over two:

Sub Macro2()
'
' Macro2 Macro
ActiveSheet.Next.Select
End Sub

Sub Macro3()
' Macro3 Macro
ActiveSheet.Next.Select
ActiveSheet.Next.Select
End Sub

"Andy Pope" wrote:

Hi,

Depending on the number of links you just need to duplicate the code
changing the test range.

If you have many cells to test then maybe,

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Dim rngTestTarget As Range

For Each rngTestTarget In Range("B2,B4,B6").Cells
If Not Intersect(Target, rngTestTarget) Is Nothing Then
On Error Resume Next
Charts(Target.Value).Activate
If Err.Number < 0 Then
MsgBox "No such chart exists.", vbCritical, _
"Chart Not Found"
End If
On Error GoTo 0
Exit For
End If
Next

End Sub

Cheers
Andy

--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Rich" wrote in message
...
That worked great. How would you alter the macro for multiple sheets in
the
same excel file? For example, cell b2 will take you to one worksheet, b4
will take you to another worksheet, etc.

Thanks,
Richard

"Andy Pope" wrote:

Hi,

See Jon's page for details of hyperlinks.
http://peltiertech.com/Excel/Hyperlinks.html

Cheers
Andy

Lorcan Dene wrote:
Hi,

i have an excel workbook with quite a few charts in it. All the data
for the
charts is stored on one sheet, is there a way of creating a hyperlink
for
each set of data to the relevent chart? I dont fancy doing buttons for
every
piece of data (that would work out at well over 30 buttons!)

--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info





  #6   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 460
Default Link To Charts

I tried doing this and it just says that no such chart exists.
I pasted the formula into the view code and when I select the cell B2 in the
worksheet and that is all that happens. Any suggestions? I know I must be
doing something wrong?
--



"Andy Pope" wrote:

Hi,

See Jon's page for details of hyperlinks.
http://peltiertech.com/Excel/Hyperlinks.html

Cheers
Andy

Lorcan Dene wrote:
Hi,

i have an excel workbook with quite a few charts in it. All the data for the
charts is stored on one sheet, is there a way of creating a hyperlink for
each set of data to the relevent chart? I dont fancy doing buttons for every
piece of data (that would work out at well over 30 buttons!)


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info

  #7   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 2,489
Default Link To Charts

The error suggests that the contents of B2 does not contain the chart sheet
name or that it is spelt incorrectly.

Cheers
Andy
--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Doug" wrote in message
...
I tried doing this and it just says that no such chart exists.
I pasted the formula into the view code and when I select the cell B2 in
the
worksheet and that is all that happens. Any suggestions? I know I must be
doing something wrong?
--



"Andy Pope" wrote:

Hi,

See Jon's page for details of hyperlinks.
http://peltiertech.com/Excel/Hyperlinks.html

Cheers
Andy

Lorcan Dene wrote:
Hi,

i have an excel workbook with quite a few charts in it. All the data
for the
charts is stored on one sheet, is there a way of creating a hyperlink
for
each set of data to the relevent chart? I dont fancy doing buttons for
every
piece of data (that would work out at well over 30 buttons!)


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info


  #8   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 460
Default Link To Charts

I have multiple charts in several sheets. I checked to make sure the chart
names match the names I have in the range B2 through B12 of my headings on
the data sheet.
Any more suggestions?
--



"Andy Pope" wrote:

The error suggests that the contents of B2 does not contain the chart sheet
name or that it is spelt incorrectly.

Cheers
Andy
--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Doug" wrote in message
...
I tried doing this and it just says that no such chart exists.
I pasted the formula into the view code and when I select the cell B2 in
the
worksheet and that is all that happens. Any suggestions? I know I must be
doing something wrong?
--



"Andy Pope" wrote:

Hi,

See Jon's page for details of hyperlinks.
http://peltiertech.com/Excel/Hyperlinks.html

Cheers
Andy

Lorcan Dene wrote:
Hi,

i have an excel workbook with quite a few charts in it. All the data
for the
charts is stored on one sheet, is there a way of creating a hyperlink
for
each set of data to the relevent chart? I dont fancy doing buttons for
every
piece of data (that would work out at well over 30 buttons!)

--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info



  #9   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 2,489
Default Link To Charts

That code example is for hyperlinking to chart sheets.
Your description of "multiple charts in several sheets" would suggest you
have chartobjects on worksheets.

If that's the case then you can use the HYPERLINK formula to link to a cell
near the chart object.

Cheers
Andy

--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Doug" wrote in message
...
I have multiple charts in several sheets. I checked to make sure the chart
names match the names I have in the range B2 through B12 of my headings on
the data sheet.
Any more suggestions?
--



"Andy Pope" wrote:

The error suggests that the contents of B2 does not contain the chart
sheet
name or that it is spelt incorrectly.

Cheers
Andy
--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Doug" wrote in message
...
I tried doing this and it just says that no such chart exists.
I pasted the formula into the view code and when I select the cell B2
in
the
worksheet and that is all that happens. Any suggestions? I know I must
be
doing something wrong?
--



"Andy Pope" wrote:

Hi,

See Jon's page for details of hyperlinks.
http://peltiertech.com/Excel/Hyperlinks.html

Cheers
Andy

Lorcan Dene wrote:
Hi,

i have an excel workbook with quite a few charts in it. All the data
for the
charts is stored on one sheet, is there a way of creating a
hyperlink
for
each set of data to the relevent chart? I dont fancy doing buttons
for
every
piece of data (that would work out at well over 30 buttons!)

--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info




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
Paste link for charts Warrain Charts and Charting in Excel 6 November 11th 07 05:10 PM
BUG?!: PP 2007 does display all "Paste as link" charts of Excel 20 JFO Charts and Charting in Excel 0 December 30th 06 10:27 PM
if i sort cell that has link to another page how to keep link steve Bahrain Excel Discussion (Misc queries) 1 August 16th 06 01:20 PM
Matching the colors Column Charts and Pie Charts RohanSewgobind Charts and Charting in Excel 3 April 21st 06 09:35 PM
how to link two charts in excel anjolaoluwa Charts and Charting in Excel 1 January 24th 05 08:34 PM


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

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"