Ok so I want to create a macro to replace a part of a hyperlink. I have tons of hyperlinks in the excel file. Is there a way to create a macro to do this.
For example
www.OldName.com/
www.Oldname.com/a/
www.Oldname.com/b/
to
www.NewName.com/
www.NewName.com/a/
www.Newname.com/b/
This will replace your hyperlink, just change the addresses and strings:
Range("E1").Hyperlinks.Add Range("E1"),Replace(Range("E1").Hyperlinks(1).Address,
"google", "msn"), , , "newtext"
来源:https://stackoverflow.com/questions/6903884/editing-hyperlinks-excel-2010-macro