50

In google spreadsheets, it is possible to add a hyperlink to a cell as:

 =hyperlink("www.google.com", "search the web")

This will show the text search the web which will hyperlink to google. However, I am wondering:

How can this rule be inserting into the middle of a cell? In other words, I'd like a single cell to look like:

click here for answer

TheMaster
  • 45,448
  • 6
  • 62
  • 85
dublintech
  • 16,815
  • 29
  • 84
  • 115
  • 2
    I'm quite surprised that such a basic feature is still lacking in (almost) 2020. – Apollys supports Monica Dec 23 '19 at 20:03
  • 1
    For those trying to achieve this programmatically, including HYPERLINK() as an arg for CONCATENATE() does not work (as of 20211127). The URL text substitution still occurs, but the hyperlink is not enabled/present. – kaanchan Nov 27 '21 at 17:29

7 Answers7

32

As of now (June, 2020), it is possible to do what you described. Here is an official documentation.

Shortly:

Select part of text where you want to add a link, then click Insert -> Link or using shortcuts - CMD + K/CTRL + K. Personally, when I was clicking Insert from menu bar, my text was deselected, so shortcut solved the issue.

Extra Note: You can also link to other cells or sheet in a spreadsheet. Really cool feature.

Aibol Kussain
  • 391
  • 4
  • 7
  • This is brilliant, thanks for the clear answer! Helped me with an issue I had no idea how to fix. – bob Feb 27 '23 at 00:15
20

EDIT (2020-Aug-06): Google Sheets now supports this; see Aibol Kussain's answer.

Original answer:

As far as I can tell, Google Sheets [still] simply does not support what you are asking for. (I've looked around for it, too.)

See, e.g., https://docs.google.com/document/preview?hgd=1&id=1x_qjPL5rmSuQWW57KcwB9lg3eiykKpd8dMEaQUZbWU8, particularly where it says:

Please note: Like the other types of data and cell formatting, links in spreadsheets must be assigned to an entire cell, you cannot have just part of the text inside a cell be hyperlinked.

Also:

Johnny Utahh
  • 2,389
  • 3
  • 25
  • 41
Thogek
  • 361
  • 3
  • 10
  • I have been looking for a solution to this for hours/days. C'mon, Google :( – Kaka Ruto Aug 05 '19 at 15:47
  • For me, all of a sudden, hyperlinks within a cell full of other text are suddenly behaving and looking like hyperlinks! But Sheets randomly decides when it can recognise them because other cells in the same column are still treating the hyperlinks that they contain as if they are plain text. – RedYeti Oct 02 '19 at 09:14
1

Today, when linking text in Google Sheets, a Tip Bubble pop'd up saying:

Cells now support multiple links You can link a portion of text or add multiple links in a cell by selecting the text and clicking the 'Insert Link' icon (or Ctrl/Cmd + K).

It is working as expected:

  1. Enter text into the cell
  2. Highlight a word in the cell (not in the formula editor)
  3. Press CMD (⌘) + K
  4. Enter a URL (Seems to prefer http://www.yourwebsitelink.com)
  5. Apply
  6. Highlight more text, repeat.
Jono
  • 11
  • 2
0

I have just tried the adding link by "insert link" on my google sheets. It hangs the browser tab, also the weblink keeps jumping into the actual cell, impossible to apply to pre written text in the cell. I have an updated Firefox on ubuntu 1804.

If any of you have this problem... The answer provided here by @Aibol works. I will go further and say:

  • Add text to cell
  • Copy weblink address
  • Ctrl - select the text to add hyperlink to
  • Ctrl+k, paste weblink address
  • Apply
-2

You can't put it in the middle of a sentence unfortunately, if you hyperlink an entire text in a google doc you can copy and paste it over into a cell. For example, you could hyperlink "Click here" and paste click here into a sheet from a google doc

Jimmy
  • 7
-4

I'm going to assume you have solved this but wanted to throw my hat in the ring for an answer. This is the line I wrote to do automatic Google search.

=HYPERLINK(CONCATENATE("https://www.google.ca/?#q=",SUBSTITUTE(A2," ","+")),"Review")

It's first you basic HYPERLINK function, within that using the CONCATENATE to bring together two things:

  1. Google Search URL https://www.google.ca/?#q= without keywords
  2. Then we have a cell with search terms, we use SUBSTITUTE of a blank space to be replaced with a + symbol

That's pretty much it. Hope it helps.

dvoutt
  • 930
  • 2
  • 9
  • 23
-4

Try with =HYPERLINK("http://www.google.com","search the web") instead of =HYPERLINK("www.google.com";"search the web")

I believe you need something like this...

 A                B
yahoo   yahoo (this will be hyperlink)
gmail   gmail (this will be hyperlink)
google  google (this will be hyperlink)

Use this to get above output

=HYPERLINK(CONCATENATE("http://www.",A1,".com"), A1)

Whenever you change content of Cell A, Cell B data will change

Hope this is what you needed!!!

Good Luck!!!

Update 1

Write yahoo in Cell A at first row...

In Cell B paste =HYPERLINK(CONCATENATE("http://www.",A1,".com"), A1) and see magic...

Update 2

Write jira/bug-56 in Cell A at first row...

In Cell B paste =HYPERLINK(CONCATENATE("http://www.myjirahost.com/browse/",RIGHT(A1,6)), CONCATENATE("http://www.myjirahost.com/browse/",RIGHT(A1,6))) and let me know if this is what you want...

Fahim Parkar
  • 30,974
  • 45
  • 160
  • 276
  • 7
    Thanks but not what I am looking for. I need the hyperlink in the middle of the cell. For example the cell could read 'Check [hyperlink] for more information'. I want the spreadsheet to be smart enough enough to detect that when I type I key word it will put the hyperlink in. – dublintech Jan 23 '12 at 11:33
  • Specific example might help here. My spreadsheet is a list of tests. I want to be able to link in JIRA bugs to the tests. So I want to be able to type in jira/bug-56 and jira/bug-55. When I type that it I want my spreadsheet to hyper link to http://myjirahost/browse/bug-55, http://myjirahost/browse/bug-56. Hope that makes sense – dublintech Jan 23 '12 at 11:37
  • let me try... will it be fine if I type bug-56 then it go to myjirahost/browse/bug-56 ?? or jira/bug-56 is compulsory?? – Fahim Parkar Jan 23 '12 at 11:40
  • also the time you type you want to go to `myjirahost/browse/bug-56` or you will click on the link generated? If you want link generated, it is SO SIMPLE... – Fahim Parkar Jan 23 '12 at 11:41
  • No,Only when the user clicks - as in a normal hyperlink. – dublintech Jan 23 '12 at 11:42
  • Not what I am looking for. I don't want to have to do this in two cells. – dublintech Jan 23 '12 at 12:13
  • 1
    let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/6967/discussion-between-dublintech-and-fahim-parkar) – dublintech Jan 23 '12 at 16:14