0

How do I get text that looks like this:

Excel desired:

Want to know how to do x? Click here

I have in s1:

=HYPERLINK("https://www.google.com.au","Click here")

in S2

Want to know how to do x? 

Another cell:

=CONCATENATE(S1&" "&S2)

I get:

Want to know how to do x? Click here < --no hyperlink.

How do I have a sentence plus a hyperlink in the same cell that looks like Excel desired.

Thanks

  • Perhaps [this](https://superuser.com/a/1138222/816500) can help? Updated for the next answer that states it is possible – Glitch_Doctor Dec 19 '17 at 12:34
  • @QHarr That shows the hyperlink for whole cell rather than partial on click here –  Dec 19 '17 at 12:36
  • @Glitch_Doctor Uh I see. Were you able to get any of those to give partial text, I wasn't. I'm surprised Excel does not have this feature –  Dec 19 '17 at 12:37
  • Sorry I just done a search and found the post... I haven't tried it out myself ^^ – Glitch_Doctor Dec 19 '17 at 12:38
  • @Glitch_Doctor The solution should work but you can't change color of formulas e.g =HYPERLINK("google.com.au","Want to know how to do x? Click here") –  Dec 19 '17 at 12:43
  • [Related question](https://stackoverflow.com/questions/11842407/excel-2010-hyperlink-text-only-not-entire-cell). AFAIK, it's not possible to get partial-length hyperlinks inside a single cell. – Vegard Dec 19 '17 at 12:46
  • @Vegard Unfortunately for recent Excels this shows whole cell as hyperlink. You can see comments about this e.g: "I tried this but Excel 2010 still shows the entire cell clickable". Disabling and re-enabling wrap does not work either –  Dec 19 '17 at 12:53
  • @GordonLeclair I know, I didn't mean to indicate that it was possible. See my answer. – Vegard Dec 19 '17 at 12:59
  • With an example like "If you want to know: [click here](http://www.example.com)." you will not even get somebody convinced that this feature would be meaningful at all. It is not in my opinion. One cell (one `Range`) can have one hyperlink. That's it and it is enough. If not, use OpenOffice or Libreoffice. There multiple hyperlinks in one cell are possible as long as you are using `ODS` file format. – Axel Richter Dec 19 '17 at 13:16

1 Answers1

0

It doesn't seem like it is possible.

Hyperlinks seem to be anchored to shapes or ranges (the cell, in your instance). That alone indicates that the entire cell will be hyperlinked, and that it isn't possible to hyperlink only a part of the cell (or its contents).

The hyperlink lists anchor as one of the required parameters (and the anchor designates where the link resides), and the description for the anchor parameter is:

The anchor for the hyperlink. Can be either a Range or Shape object.

Meaning you can't anchor a hyperlink to a particular piece of text.

Also, you can only have 1 hyperlink per shape, which lends further evidence to this impossibility.

Vegard
  • 3,587
  • 2
  • 22
  • 40