7 Simple Methods to Insert Hyperlinks in Excel

Excel SEO
Excel SEO

Inserting hyperlinks in an Excel spreadsheet can be an extremely useful operation to improve navigability and end-user experience. Whether it’s links to web pages, other tabs in your file, or even email addresses, the options available to you are numerous and easy to implement.

In this article, we will explore in detail 7 simple and intuitive methods to insert hyperlinks in Microsoft Excel. You’ll discover how to make the most of the software’s built-in features, as well as some more advanced techniques that will allow you to automate and customize your links. Get ready to make your spreadsheet even more interactive and user-friendly.

1. Insert a Hyperlink from the Insert Tab

One of the most straightforward ways to insert a hyperlink in Excel is through the “Insert” tab. Let’s see how to proceed:

Add a link to a website

  1. Select the cell where you want to insert the link.
  2. Go to the “Insert” tab and click on the “Link” command.
  3. In the “Insert Hyperlink” window, type a description in the “Text to display” field. This will become the content of your cell.
  4. Click the “ScreenTip” button to add a more detailed description that will appear when you hover your mouse over the link.
  5. Paste the desired web address into the “Address” field.
  6. Click “OK” to confirm.

Add a link to another tab

  1. Select the cell from which you want to create the link.
  2. Go to the “Insert” tab and click on the “Link” command.
  3. In the “Insert Hyperlink” window, select the “Place in This Document” option on the left.
  4. Under “Cell reference,” choose the tab you want to link to.
  5. Enter the specific cell reference you want to point to.
  6. Click “OK” to confirm.

Add a link to an email

  1. Select the cell to link.
  2. Go to the “Insert” tab and click on the “Link” command.
  3. In the “Insert Hyperlink” window, select the “E-mail Address” option on the left.
  4. In the “E-mail address” field, enter the recipient’s address.
  5. Describe the subject of the message in the “Subject” field and click “OK.”

2. Insert a Hyperlink from the Right-Click Menu

An alternative to the previous method is to use the menu that appears when you right-click on the cell to be linked:

  1. Right-click on the cell you want to make a hyperlink.
  2. Select the “Link” option.
  3. You will be redirected to the “Insert Hyperlink” window again, where you can create any type of link you desire.

3. Insert a Hyperlink with a Keyboard Shortcut

Another convenient shortcut to access the “Insert Hyperlink” window is through a key combination:

  1. Select the cell to link.
  2. Press “Ctrl” + “K” on your keyboard.
  3. This will instantly open the “Insert Hyperlink” window.

4. Insert a Hyperlink with the HYPERLINK Function

Excel offers a dedicated function called “HYPERLINK” that allows you to create hyperlinks similarly to the “Insert Hyperlink” window.

Here’s how to use it to link to a webpage: =HYPERLINK("http://www.example.com/", "Go to the site")

The first argument is the web address you want to link to, while the second determines the text that will be displayed in the cell.

To link to another tab within the same file, the syntax is slightly different: =HYPERLINK("#'Sheet2'!A1", "Go to Sheet2")

Here the cell reference is preceded by the # symbol to indicate that the link is within the same file.

Finally, here’s how to create a link to an email: =HYPERLINK("mailto:example@email.com", "Send email")

The “mailto:” prefix indicates that it is an email address.

5. Insert a Hyperlink with Copy and Paste

A unique method to insert a hyperlink is through right-click copy and paste:

  1. Locate the target cell for your link.
  2. Place the cursor on the border of the cell until a four-headed arrow appears.
  3. Right-click and drag to the cell where you want to create the link, then release the button.
  4. Select the “Create Hyperlink Here” option.

This method allows you to “paste” the link directly into the source cell.

6. Insert a Hyperlink with VBA

If you are familiar with VBA programming, you can automate the insertion of hyperlinks within your Excel spreadsheet.

For example, let’s assume you have sheet names in a range of cells. Here’s how to convert them into hyperlinks:

  1. Open the VBA Editor by pressing “Alt” + “F11” or selecting “Visual Basic” from the “Developer” tab.
  2. Go to the “Insert” menu and select “Module.”
  3. Paste the following code into the new module:

 

Sub InsertHyperlinks()
    Dim ws As Range
    Dim linkDestination As String
    Dim friendlyName As String
    
    For Each ws In Selection.Cells
        linkDestination = "#'" & ws & "'!A1"
        linkDestination = """" & linkDestination & """"
        friendlyName = """" & ws.Value & """"
        ws.Formula = "=HYPERLINK(" & linkDestination & "," & friendlyName & ")"
    Next
End Sub
  1. Select the desired range of sheet names.
  2. Go to the “View” tab, select “Macros,” and choose your “InsertHyperlinks” script.
  3. Click “Run” to transform the names into hyperlinks.

7. Insert a Hyperlink with Office Scripts

If you use Microsoft 365 Business, you can leverage Office Scripts to automate the insertion of hyperlinks in your Excel online spreadsheet.

Here’s how to proceed:

  1. Open your Excel file in the browser and go to the “Automate” tab.
  2. Click “New script” to create a new script.
  3. Paste the following code into the editor:

 

function main(workbook: ExcelScript.Workbook) {
    let range = workbook.getSelectedRange();
    let rowCount = range.getRowCount();
    let colCount = range.getColumnCount();
    
    for (let r = 0; r < rowCount; r++) {
        for (let c = 0; c < colCount; c++) {
            let currentCell = range.getCell(r, c);
            let linkedSheetName = currentCell.getValue();
            currentCell.setHyperlink({
                textToDisplay: linkedSheetName.toString(),
                documentReference: `${linkedSheetName}!A1`
            });
        }
    }
}
  1. Select the desired range of sheet names.
  2. Click "Run" in the editor to apply the hyperlinks.

Conclusion

In this article, we've explored 7 simple and intuitive methods for inserting hyperlinks in Microsoft Excel, utilizing both the software's built-in features and more advanced techniques like VBA and Office Scripts. You now have a wide range of options to make your spreadsheet even more interactive and user-friendly, facilitating navigation and improving the overall end-user experience. Which method did you find most convenient or interesting? Share your experience in the comments!

Pubblicato in

Se vuoi rimanere aggiornato su 7 Simple Methods to Insert Hyperlinks in Excel iscriviti alla nostra newsletter settimanale

Be the first to comment

Leave a Reply

Your email address will not be published.


*