Conditional hyperlink onto a shape

mrewdorrison

New Member
Joined
Jun 9, 2015
Messages
1
Hello all,

I have a project I've been working on and up till this point I've been using shapes to link to other sheets within the workbook. However, I would like to add a new "current stage" button that will send me to a specific sheet depending on the value in cell A5 in Sheet1.

I'm pretty new to excel (been teaching myself for about a year), so I don't even know if you can apply a conditional hyperlink onto a shape. If it is possible I was hoping you all could help me out.

Thanks in advance!
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

Worf

Well-known Member
Joined
Oct 30, 2011
Messages
4,183
Hello and welcome to the Board

- create the hyperlink manually (this can be automated if you want)
- paste the code where indicated
- type the sheet name at A5 and the link will be updated.

Code:
' at Sheet1 module
Private Sub Worksheet_Change(ByVal Target As Range)
Dim s As Shape
Set s = Me.Shapes("Image1")
If Target = [a5] And Len(Target) > 0 Then s.Hyperlink.SubAddress = Range("a5") & "!a1"
End Sub
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,418
Messages
5,837,129
Members
430,477
Latest member
roseinsydney

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
Top