Newbie here, looking for some help with VBA scripting.
Goal:
Run a VBA script to replace the display text for any hyperlinks in an Excel sheet starting with
CodePudding user response:
Try this:
Sub ReplaceHyperlinks()
Dim Ws As Worksheet
Dim lnk As Hyperlink
Set Ws = Application.ActiveSheet
For Each lnk In Ws.Hyperlinks
If LCase(lnk.Address) Like "*google.com*" Then 'Google link ?
lnk.TextToDisplay = "Google"
End If
Next
End Sub