Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to construct a hyperlink from a URL and a name in different cells.

a1 = http://www.example.com/
b1 = example
c1 = <a href="http://www.example.com/">example</a>

What I want that is the URL in A1 to is made into a hyperlink with the name taken from B1:

<a href="http://www.example.com/">example</a>

I created a formula, but it's not working

<a href=&”=a1”>&”=b1”</a>

should result in

<a href="http://www.example.com/">example</a>
share|improve this question
2  
What topics did you find online and why did they not work? Can you link them please - so we know what you've tried. Also please try to clarify your aim of the formula. –  HaydnWVN Aug 2 '12 at 9:31
1  
Welcome to Super User! We had a hard time trying to figure out what you were actually asking. Please check my edit to your post and tell us if that is what you wanted. Also check the source of this post to see the formatting I used. Think about your readers, they might not be able to guess what you really want. –  slhck Aug 2 '12 at 9:34
add comment

3 Answers

It is very difficult to understand your question, especially when you don't respond to comments/answers.

That said, here's one interpretation of your question:

You want cell C1 to display the text shown in cell B to be a hyperlink to the URL specified in Cell A.

To achieve this, type this into cell C1

=HYPERLINK(A1,B1)

An alternative interpretation is that you want a formula in cell C1 that returns the value

<a href="http://www.example.com/">example</a>

to achieve this, type this into cell C1

="<a href=""" & A1 & """>" & B1 & "</a>"
share|improve this answer
add comment

The word you want is Concatenate.

=CONCATENATE("<a href=",CHAR(34),A1,CHAR(34),">", B1, "</a>")
share|improve this answer
add comment

Try using this formula in C1

="<a href="&""""&A1&""">"&B1&"</a>"

I will try and break this down to explain it to you.

Firstly, every formula starts with an "=" in excel. Everything that you do not want excel to try and evaluate you put in double quotes for example excel will display this

"<a href="

As just text. but will display

"<a href="& A1

as

<a href =[Whatever was in cell A1]
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.