Skip to content
Tags

Remove hyperlinks in Excel

2011/05/28

When reporting fileservice data in an excel sheet you often need to document UNC paths like

\\servername\share\directory….

when you edit this cells excel creates automatically a hyperlink that takes you to the UNC path when you click on it. That makes manual editingthis cells harder. You can easily remove hyperlinks with this VBA code. Create a macro from it and ease the pain:

Set rng = application.selection
rng.ClearHyperlinks 
rng.ClearFormats

 

The first clears the hyperlinks and the second clears the special formatting

This works in Excel 2010

Advertisements

From → office clients

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: