ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Create HTML code for a hyperlink from cell contents (https://www.excelbanter.com/excel-worksheet-functions/268319-create-html-code-hyperlink-cell-contents.html)

Billy_McSkintos

Create HTML code for a hyperlink from cell contents
 
I would like to create the HTML code for a hyperlink in a cell from the text contents of two other cells. I'm sure you know the HTML but here goes:

HTML Code...

<a href="http://www.google.com"Google</a

...would produce a hyperlink to Google

If the URL (http://www.google.com) is in cell A1
and the name (Google) is in cell A2
I want to populate cell A3 with the EXACT text

<a href="A1"A2</a

where the contents of A1 and A2 are displayed:
<a href="http://www.google.com"Google</a

I hope that makes sense, can you help me?

Billy_McSkintos

Quote:

Originally Posted by Billy_McSkintos (Post 962351)
I would like to create the HTML code for a hyperlink in a cell from the text contents of two other cells. I'm sure you know the HTML but here goes:

HTML Code...

<a href="http://www.google.com"Google</a

...would produce a hyperlink to Google

If the URL (http://www.google.com) is in cell A1
and the name (Google) is in cell A2
I want to populate cell A3 with the EXACT text

<a href="A1"A2</a

where the contents of A1 and A2 are displayed:
<a href="http://www.google.com"Google</a

I hope that makes sense, can you help me?

I'm sure there is an easier way but I created 3 more columns:

A4: <a href="
A5: "
A6: </a

In A3 I then used =CONCATENATE(A4,A1,A5,A2,A6)


All times are GMT +1. The time now is 04:10 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com