Jake
Jake

Reputation: 1057

Excel combine cell content into an html code?

Basically I have a html code in a cell which I'd like to pick out content from different cells in the same row.

This cell is C2;

<a href="/signup?name=A2&email=B2">Go</a>

Output would be;

<a href="/signup?name=James&[email protected]">Go</a>

So the A2 and B2 would be contents of their respective cells. Tried out a few things but kept getting errors, is this even possible?

Upvotes: 1

Views: 3903

Answers (1)

marlenunez
marlenunez

Reputation: 626

It sure is possible! You just need to make it a formula.

="<a href=""/signup?name="&A2&"&email="&B2&""">Go</a>"
  • Please note the & signs next to the cell addresses are different from the other ones. These are the glue that let you concatenate the cell values to the HTML text.

  • Also note that wherever you had a double quote in the HTML code, you now have escaped double quotes.

Upvotes: 3

Related Questions