Link to home
Create AccountLog in
Avatar of Jerry L
Jerry LFlag for United States of America

asked on

Excel - How to Add Hyperlink to Plain Text

Excel 2013
Windows 7

BACKGROUND:
I have a list of names and dates all in one column that include hyperlinks. I expanded the contents of each cell to multiple columns. But, in doing so, I lost the hyperlinks.

PROBLEM:
I need a formula or Macro that takes the hyperlink from one cell in COL A and applies it to the adjacent cell in COL B, but I need to be able to tell it what SRC column and what DEST column to use; it's not always A and B.

NOTE: Only the first cell of the expanded data needs the hyperlink.

SAMPLE DATA:
Original Data - This shows the first Column that contains the original data and the adjacent Columns that have been expanded - (copy/paste this sample data to your Excel spreadsheet and then add any hyperlink by hand to first Column cells for testing)

NOTE: To retain the proper layout in Excel, you may need to paste the code first into a plain text editor such as Notepad, then copy and paste into Excel.
Last2, First2 (1079-1142)	Last2	First2	1079	1142
First3 Last3, (1098-1179)	First3 Last3		1098	1179
Last1, First1 (1986)	Last1	First1		1986
Last4, (1983)	Last4			1983

Open in new window

The result should be that the first cell in the adjacent data will contain the hyperlink from it's source cell on the left. For example, "Last2" in Cell B1 will contain the hyperlink from "Last2, First2 (1079-1142)" in Cell A1.
ASKER CERTIFIED SOLUTION
Avatar of Jerry L
Jerry L
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer