Conditional Cell Range Highlighting

ADHEND23

New Member
Joined
Jun 11, 2015
Messages
1
Hello,

I am trying to create a code that will highlight certain cells once a hyperlink has been clicked. I have multiple hyperlinks on the same sheet that, once clicked, link to certain cells on separate sheets. I would like to know if I can have a user click a hyperlink and have them be taken to the new sheet and have those cells become highlighted.

I would also like those cells to become un-highlighted once the user either switches sheets or clicks a new hyperlink.

I am not too familiar with VBA but I believe that would be the easiest route. If anyone can lead me in the right direction I would greatly appreciate it.

Thank you,
ADHEND23
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Hello,

If you create a screentip for each of your hyperlinks, you could use the following code, which needs to go into the relevant sheet code window, not a standard module.

Code:
 Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
    Sheets("Sheet2").Cells.Interior.ColorIndex = xlNone
    Select Case Target.ScreenTip
        Case "a"
            Sheets("Sheet2").Range("A1").Interior.Color = vbRed
        Case "b"
            Sheets("Sheet2").Range("A3, A5").Interior.Color = vbGreen
    End Select
End Sub

Is this feasible?
 
Upvote 0

Forum statistics

Threads
1,214,970
Messages
6,122,514
Members
449,088
Latest member
RandomExceller01

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