SOLVED

How to insert hyperlink in text part of non empty excel cell

Copper Contributor

Hi

I wonder how to make multiple hyperlinks inside a non empty excel cell, s.t. only the urls are shown as hyperlinks – not the entire string in cell.

E.g.

  1. Type in excel cell “this is a test of hyperlinks to”
  2. Then add two urls e.g. https://www.google.dk and https://www.google.com
  3. Now you see in cell2023-01-08_10-21-22.jpg

        i.e. without hyperlinks for urls.

What I would like to see is like in word 2023-01-08_10-25-53.jpg

I.e. hover over e.g. "this is a test of hyperlinks to" no url will be shown.

Br

Peter

19 Replies

@plaurits 

You might do the following:

1) On the Insert tab of the ribbon, insert Link (or press Ctrl+K).

2) Enter the URL in the Address box. It will automatically be copied to the 'Text to display' box.

S2132.png

3) Edit the 'Text to display' and add some text:

S2133.png

4) Click OK. The entire cell will act as a hyperlink to the desired URL, but it will display the extra text:

S2134.png

Hi Hans
Thanks for response. I know the procedure you mention, this is not what I want since the whole text is marked as hyperlink.

Hi, @plaurits

 

Here I attach a file with a working solution and here I explain how I did it:

1. Right-click the cell and add the link to the website

2. Make sure the "Text to display" input is different from the "Address" input.

3. Click OK

4. Select the cell preferably using the arrows on your keyboard.

5. Go to the "Home" tab in the Ribbon

6. On the "Editing" Group. Click the dropdown of the "Clear" menu and select "Clear Formats".

7. Using the formula bar, select the text you want to display as a hyperlink and format it as desired using the commands in the "Font" group within the "Home" tab.

Thanks, this is still not what I want since entire line will be shown when you hover over. See my updated description.

Still that does not solve the issue described in my first post on this thread.

@plaurits 

What you want is not possible.

Thanks Hans.
That was also what I suspected, so I have marked your response as best response.
Thanks anyway
Peter

@plaurits 

 

I don't love being told something is not possible. And, because of that, I found a workaround that I believe should work for you. It is not exactly everything within the cell... But, I believe it is good enough.

 

Here I attach the solution.

 

Does that work for you?

 

Best,

Thanks, this works fine when you have only one hyperlink in cell.
I understand that having multiple hyperlinks in one cell is not possible, so in that case you need to split into multiple cells with one hyperlink in each cell.
best response confirmed by plaurits (Copper Contributor)
Solution

@plaurits 

 

That is actually not true. I just did more than one link within the same cell.

 

Watch it working in the file attached.

 

@ricardojose 

Thanks, now I see in your solution (3) sheet - problem was that this sheet was not in your file from yesterday.
Could you pls. describe step by step the procedure you used?

br Peter

 

2023-01-10_05-53-25.jpg

@plaurits 

 

1. Type all the text you want into the cell.

2. Using the formula bar, select the texts you want to look like hyperlinks and format them accordingly

3. Create as many shapes (rectangles) as links you have in the cell and put each shape over (covering) each of the hyperlinks.

4. Right-click on the first shape, and select "Link" from the menu. Add the URL accordingly and click "OK"

5. Repeat step 4 for the rest of the shapes.

6. Select all shapes at once and format them so they have "No fill" and "No outline border". That way they will be completely transparent and the texts behind them are shown.

 

I hope that makes sense!

 

Best,

Thanks again Ricardo
Procedure works fine.
br Peter
Thanks. Pls. note that @ricardojose has already described a more generic solution under best response.
I think this should be an enhancement that Microsoft considers putting in place as it is widely used. Google Sheets has the ability to add multiple hyperlinks to different words in a cell without the entire cell taking on one URL or without having to manipulate the document with these workarounds. The issue with the workarounds come when you need to copy/paste that text some place else. Those links and formatting does not carry over. In addition, the hyperlink themselves don't happen automatically as it does in Word or Google Docs.
This is something that always plagued me, as I was hoping to do cross referencing between cells, like hyperlinking text to cells in other worksheets for professional documentation or to links elsewhere. This is similar to footnote references or in HTML docs where you can click on a locator, e.g. go to "Section 2" in the "Key Principles" Worksheet.

While this is a creative idea, this solution is very fragile as the moment anything changes or edited, any overlays you've created will all be out of place. I assume that this hasn't changed in the past few months and at least know the answer to this question.

I completely agree and you make a great point here! -- "...solution is very fragile as the moment anything changes or edited, any overlays you've created will all be out of place".

Doing all those object overlays, etc is more work than it's worth.

@plaurits 

 

1 - Enter all text you wish to have in the cell. 

2 - Create a link of the cell contents. 

2 - Use the text formatting to adjust the text in font of and behind the desired link. 

 

breinerjack_0-1701723739919.png

 

The above will have the entire cell act as the link, but generally the user will click on the blue link. Hope this helps a bit. 

1 best response

Accepted Solutions
best response confirmed by plaurits (Copper Contributor)
Solution

@plaurits 

 

That is actually not true. I just did more than one link within the same cell.

 

Watch it working in the file attached.

 

View solution in original post