Excel: How do I copy hyperlink address from one column of text to another column with different text?

Posted by OfficeLackey on Super User See other posts from Super User or by OfficeLackey
Published on 2014-06-04T15:16:41Z Indexed on 2014/06/04 15:29 UTC
Read the original article Hit count: 215

I have a spreadsheet where column A displays names in a certain format. There are 200-odd names and each has a different hyperlink (which links to that person's web page). I want to reformat the name order so it is "Surname, Name" rather than "Name Surname" and retain the hyperlink in the newly formatted column.

I have achieved "Surname, Name" easily by splitting the names into two columns (using LEFT and RIGHT formulae) - forename and surname - then I have a new column with a formula to return "Surname, Name." However, the hyperlinks are not in that new column and I need them. I don't want to do this manually, for obvious reasons. I cannot find a way of copying just hyperlinks from column A without copying the text from column A.

So, effectively, what I need is some sort of macro to take, for example, the hyperlink from A2 and copy it to H2, with H2 still retaining the updated ordering of name. I don't have the knowledge to write this myself, so would appreciate solutions.

© Super User or respective owner

Related posts about microsoft-excel

Related posts about vba