How to use Excel HYPERLINK function to create different link types

This tutorial explains the basics of the Excel HYPERLINK function and provides a few tips and formula examples to use it most efficiently.

There are many ways to create a hyperlink in Excel. To link to a certain web page, you can simply type its URL in a cell, hit Enter, and Microsoft Excel will automatically convert the entry into a clickable hyperlink. To link to another worksheet or a specific location in another Excel file, you can use the Hyperlink context menu or Ctrl + K shortcut. If you plan to insert many identical or similar links, the fastest way is to use a Hyperlink formula, which makes it easier to create, copy and edit hyperlinks in Excel.

The HYPERLINK function in Excel is used to create a reference (shortcut) that directs the user to the specified location in the same document or opens another document or web-page. By using a Hyperlink formula, you can link to the following items:

  • A specific place such as a cell or named range in an Excel file (in the existing sheet or in another worksheet or workbook)
  • Word, PowerPoint or other document stored on your hard disk drive, local network or online
  • Bookmark in a Word document
  • Web-page on the Internet or intranet
  • Email address to create a new message

The function is available in all versions of Excel for Office 365, Excel 2019, Excel 2016, Excel 2013, Excel 2010, Excel 2007, Excel 2003, Excel XP, and Excel 2000. In Excel Online, the HYPERLINK function can only be used for web addresses (URLs).

The syntax of the HYPERLINK function is as follows:

HYPERLINK(link_location, [friendly_name])


  • Link_location (required) is the path to the web-page or file to be opened.

    Link_location can be supplied as a reference to a cell containing the link or a text string enclosed in quotation marks that contains a path to a file stored on a local drive, UNC path on a server, or URL on the Internet or intranet.

    If the specified link path does not exist or is broken, a Hyperlink formula will throw an error when you click the cell.

  • Friendly_name (optional) is the link text (aka jump text or anchor text) to be displayed in a cell. If omitted, link_location is displayed as the link text.

    Friendly_name can be supplied as a numeric value, text string enclosed in quotation marks, name, or reference to a cell that contains the link text.

Clicking a cell with a Hyperlink formula opens the file or web-page specified in the link_location argument.

Below, you can see the simplest example of an Excel Hyperlink formula, where A2 contains friendly_name and B2 contains link_location:


The result may look something similar to this:
Examples of using the HYPERLINK function in Excel

More formula examples demonstrating other uses of the Excel HYPERLINK function follow below.

Moving from theory to practice, let's see how you can use the HYPERLINK function to open various documents directly from your worksheets. We will also discuss a more complex formula where Excel HYPERLINK is used in a combination with a few other functions to accomplish a non-trivial challenging task.

The Excel HYPERLINK function enables you to insert clickable hyperlinks of a few different types depending on what value you supply to the link_location argument.

Hyperlink to another worksheet

To insert a hyperlink to a different sheet in the same workbook, supply the target sheet name preceded by a pound sign (#), and followed by the exclamation point and target cell reference, like this:

=HYPERLINK("#Sheet2!A1", "Sheet2")

The above formula creates a hyperlink with the jump text "Sheet2" that opens Sheet2 in the current workbook.

If the worksheet name includes spaces or non-alphabetical characters, it must be enclosed in single quotation marks, like this:

=HYPERLINK("#'Price list'!A1", "Price list")

In the same way, you can make a hyperlink to another cell in the same sheet. For example, to insert a hyperlink that will take you to cell A1 in the same worksheet, use a formula similar to this:

=HYPERLINK("#A1", "Go to cell A1")

Hyperlink to a different workbook

To create a hyperlink to another workbook, you need to specify the full path to the target workbook in the following format:


For example:

=HYPERLINK("D:\Source data\Book3.xlsx", "Book3")

To land on a specific sheet and even in a specific cell, use this format:


For example, to add a hyperlink titled "Book3" that opens Sheet2 in Book3 stored in the Source data folder on drive D, use this formula:

=HYPERLINK("[D:\Source data\Book3.xlsx]Sheet2!A1", "Book3")

If you plan to move your workbooks to another location soon, you can create a relative link like this:

=HYPERLINK("Source data\Book3.xlsx", "Book3")

When you move the files, the relative hyperlink will continue working as long as the relative path to the target workbook remains unchanged. For more information, please see Absolute and relative hyperlinks in Excel.

Hyperlink to a named range

If you are making a hyperlink to a worksheet-level name, include the full path to the target name:


For instance, to insert a link to a range named "Source_data" stored on Sheet1 in Book1, use this formula:

=HYPERLINK("[D:\Excel files\Book1.xlsx]Sheet1!Source_data","Source data")

If you are referencing a workbook-level name, the sheet name does not need to be included, for example:

=HYPERLINK("[D:\Excel files\Book1.xlsx]Source_data","Source data")

Hyperlink to open a file stored on a hard disk drive

To create a link that will open another document, specify the full path to that document in this format:


For example, to open the Word document named Price list that is stored in the Word files folder on drive D, you use the following formula:

=HYPERLINK("D:\Word files\Price list.docx","Price list")

Hyperlink to a bookmark in a Word document

To make a hyperlink to a specific location in a Word document, enclose the document path in [square brackets] and use a bookmark to define the location you want to navigate to.

For example, the following formula adds a hyperlink to the bookmark named Subscription_prices in Price list.docx:

=HYPERLINK("[D:\Word files\Price list.docx]Subscription_prices","Price list")

Hyperlink to a file on a network drive

To open a file stored in your local network, supply the path to that file in the Universal Naming Convention format (UNC) that uses double backslashes to precede the name of the server, like this:


The below formula creates a hyperlink titled "Price list" that will open the Price list.xlsx workbook stored on SERVER1 in Svetlana folder:

=HYPERLINK("\\SERVER1\Svetlana\Price list.xlsx", "Price list")

To open an Excel file at a specific worksheet, enclose the path to the file in [square brackets] and include the sheet name followed by the exclamation point (!) and the referenced cell:

=HYPERLINK("[\\SERVER1\Svetlana\Price list.xlsx]Sheet4!A1", "Price list")

Hyperlink to a web page

To create a hyperlink to a web-page on the Internet or intranet, supply its URL enclosed in quotation marks, like this:

=HYPERLINK("","Go to")

The above formula inserts a hyperlink, titled "Go to", that opens the home page of our web-site.

Hyperlink to send an email

To create a new message to a specific recipient, provide an email address in this format:


For instance:

=HYPERLINK("","Drop us an email")

The above formula adds a hyperlink titled "Drop us an email", and clicking the link creates a new message to our support team.

When working with large datasets, you may often find yourself in a situation when you need to look up a specific value and return the corresponding data from another column. For this, you use either the VLOOKUP function or a more powerful INDEX MATCH combination.

But what if you not only want to pull a matching value but also jump to the position of that value in the source dataset to have a look at other details in the same row? This can be done by using the Excel HYPERLINK function with some help from CELL, INDEX and MATCH.

The generic formula to make a hyperlink to the first match is as follows:

HYPERLINK("#"&CELL("address", INDEX(return_range, MATCH(lookup_value, lookup_range,0))), INDEX(return_range, MATCH(lookup_value, lookup_range,0)))

To see the above formula in action, consider the following example. Supposing, you have a list of vendors in column A, and the sold products in column C. You aim to pull the first product sold by a given vendor and make a hyperlink to some cell in that row so you can review all other details associated with that particular order.

With the lookup value in cell E2, vendor list (lookup range) in A2:A10, and product list (return range) in C2:C10, the formula takes the following shape:

=HYPERLINK("#"&CELL("address", INDEX($C$2:$C$10, MATCH($E2,$A$2:$A$10,0))), INDEX($C$2:$C$10, MATCH($E2,$A$2:$A$10,0)))

As shown in the screenshot below, the formula pulls the matching value and converts it into a clickable hyperlink that directs the user to the position of the first match in the original dataset.
Vlookup and create a hyperlink to the first match

If you are working with long rows of data, it might be more convenient to have the hyperlink point to the first cell in the row where the match is found. For this, you simply set the return range in the first INDEX MATCH combination to column A ($A$2:$A$10 in this example):

=HYPERLINK("#"&CELL("address", INDEX($A$2:$A$10, MATCH($E2,$A$2:$A$10,0))), INDEX($C$2:$C$10, MATCH($E2,$A$2:$A$10,0)))

This formula will take you to the first occurrence of the lookup value ("Adam") in the dataset:
Vlookup and insert a hyperlink to the first occurrence to the lookup value

How this formula works

Those of you who are familiar with the INDEX MATCH formula as a more versatile alternative to Excel VLOOKUP, have probably already figured out the overall logic.

At the core, you use the classic INDEX MATCH combination to locate the first occurrence of the lookup value in the lookup range:

INDEX(return_range, MATCH(lookup_value, lookup_range, 0))

You can find full details on how this formula works by following the above link. Below, we will outline the key points:

  • The MATCH function determines the position of "Adam" (lookup value) in range A2:A10 (lookup range), and returns 3.
  • The result of MATCH is passed to the row_num argument of the INDEX function instructing it to return the value from the 3rd row in range C2:C10 (return range). And the INDEX function returns "Lemons".

This way, you get the friendly_name argument of your Hyperlink formula.

Now, let's work out link_location, i.e. the cell the hyperlink should point to. To get the cell address, you use the CELL("address", [reference]) function with INDEX MATCH as reference. For the HYPERLINK function to know that the target cell resides in the current sheet, concatenate the cell address with the pound character ("#").

Note. Please notice the use of absolute cell references to fix the lookup and return ranges. This is critical if you plan to insert more than one hyperlink by copying the formula.

Download this Excel Hyperlink formula

As mentioned in the beginning of this tutorial, one of the most useful benefits of formula-driven hyperlinks is the ability to edit multiple Hyperlink formulas in one go by using Excel's Replace All feature.

Let's say you want to replace the old URL of your company ( with the new one ( in all hyperlinks on the current sheet or in the entire workbook. To have it done, please follow the steps outlined below:

  1. Press Ctrl + H to open the Replace tab of the Find and Replace dialog.
  2. In the right-hand part of the dialog box, click the Options button.
  3. In the Find what box, type the text you want to change ("" in this example).
  4. In the Within drop-down list, select either Sheet or Workbook depending on whether you want to change hyperlinks on the current worksheet only or in all sheets of the current workbook.
  5. In the Look in drop-down list, select Formulas.
  6. As an extra precaution, click the Find All button first, and Excel will display a list of all formulas containing the search text:
    Find all formulas containing the search text.
  7. Look though the search results to make sure you want to change all of the found formulas. If you do, proceed to the next step, otherwise refine the search.
  8. In the Replace with box, type the new text ("" in this example).
  9. Click the Replace All button. Excel will replace the specified text in all found hyperlinks and notify you how many changes have been made.
    Change multiple hyperlinks at a time.
  10. Click the Close button to close the dialog. Done!

In a similar fashion, you can edit the link text (friendly_name) in all Hyperlink formulas at the same time. When doing so, be sure to check that the text to be replaced in friendly_name does not appear anywhere in link_location so that you won't break the formulas.

The most common reason for a Hyperlink formula not working (and the first thing for you to check!) is a non-existent or broken path in the link_location argument. If it's not the case, check out the following two things:

  1. If the link destination does not open when you click a hyperlink, make sure the link location is supplied in the proper format. Formula examples to create different hyperlink types can be found here.
  2. If instead of the link text an error such as VALUE! or N/A appears in a cell, most likely the problem is with the friendly_name argument of your Hyperlink formula.

    Typically, such errors occur when friendly_name is returned by some other function(s), like in our Vlookup and hyperlink to the first match example. In this case, the #N/A error will show up in the formula cell if the lookup value is not found within the lookup table. To prevent such errors, you may consider using the IFERROR function to display an empty string or some user-friendly text instead of the error value.

This is how you create hyperlinks using the Excel HYPERLINK function. I thank you for reading and hope to see you on our blog next week!

You may also be interested in

Category: Excel Tips

Table of contents

46 responses to "How to use Excel HYPERLINK function to create different link types"

  1. Jill says:

    Is there a way to create a basic hyperlink formula using an absolute cell reference within the same or a different workbook? I have tried adding the $ to cell reference in link location but it does not appear to work. Thanks!

  2. Jill says:

    Never mind...I was able to get an absolute reference to work only when a defined/named range is used instead of direct cell reference. For anyone who cares :)!

  3. rohan says:

    Very nice Article! Thanks

  4. Catherine says:

    I have a formula which relates to a separate sheet in the workbook. I would like it to be hyperlinked to the other sheet. The problem is that the list is too long to do this individually. Is there a way I can add the hyperlink into the existing formula.

    =OFFSET('1st Quarter'!A$33,ROWS(A$33:A33)*31-31,0)

    Thanks is inticipation

  5. mohammad says:

    i have a column about mail address, ',....
    and want to replace column to "!m1", "@m1" how to set it?

  6. mohammad says:

    as tag a href

  7. Lisa says:

    I have a hyperlink to a cell in the same worksheet, however, when a row is added or deleted, the hyperlink then points to the wrong cell. How can I make the hyperlink relative so it always points to the correct cell, regardless of how many rows are added or deleted? Thank you so much!!

  8. kanil says:

    Hi Svetlana ,
    How can I attach an Excel wk sheet rather than a lenthy writing
    Wk-sht has only 6-7 lines and the problem will be obvious at the first glance
    It is on HYPERLINK with Dymanic wk-sheet name
    It shows what works correctly - Non Dynamic
    But when made to be a Dynamic wk-sht name via INDIRCET() it failed miserably


  9. Gene says:

    I have cells with a link and text copied from a web page. The short cut shows in the cell and a mouseover the cell shows the link. Is there a way to separate these and put them in different cells for example:

    A1: Church Record Mouseover says: in popup

    A2: Church Record



  10. ANKIT says:



  11. Mohan says:

    I am using hyperlink formula "HYPERLINK("#Bhoo!c6","")" When i am using this i am getting the result but i want this formula in the same cell and i tried this. ="270000"&HYPERLINK("#Bhoo!c6","")- not getting the result

  12. Johnson says:

    I have an Excel file with different reference numbers in each cell (row) Hyperlinked as shown below. when I add new rows and drag the last reference number down I get reference numbers in serial but the hyperlink doesn't change. Every time I have to spend lot of time to change manually. IS THERE ANY WAY TO CHANGE THE HYPERLINKS AT A TIME??


    Please help.


  13. Kerry says:

    Hello! Can you provide a few examples for why someone would use the create a hyperlink that creates a pre-addressed email message feature in Excel. I'm going through the Excel 2016 exam 77/727 guide, and I'm having a little difficulty determining under what circumstances a user would use this feature.

    Any guidance would be appreciated. Thanks!

  14. Ashish says:

    =HYPERLINK("[D:\Word files\Price list.docx]Subscription_prices","Price list")

    I want to inset cell reference i.e C3 at (subscription_prices) i.e bookmark place..
    Pls kindly help with respect to above..

  15. Clayton says:

    I have tried every variant from simple to complex and I don't even get an error message (#VALUE or N/A) returned, just the text of the formula as I typed it as if Excel 2007 doesn't even recognize it as a formula. Is the formula part of a toolpak or add-in I need to install?

  16. hamidreza says:

    All hyperlinks in my Excel file have Changed to the following path
    The main path is on the network drive map \\filesrv\...
    This change of course has happened suddenly.
    1-Why is this happening?
    2-How to correct the paths to the main path in the network drive?
    The number of Hyperlinks is high
    Please help.

  17. paul says:

    This post was exactly what I was looking for--thanks! I had thousands of URLs in a spreadsheet and I needed each one to display "Read More" instead of the displaying the whole URL.

  18. Jason says:

    I'm having the same problem as Lisa (post 7. When I use the hyperlink function to point to a cell on another sheet in the same workbook, the hyperlink doesn't adjust dynamically with the cell when it is moved. I.E. I use the formula =HYPERLINK("#'Calcs. Form'!D12","1-100"), but if I delete cell D11 on the 'calcs. form' and my 'D12' cell moves up, my hyperlink still points to D12 instead of moving up to D11. The only solution I have found is to actually give the cell a unique name, via define name, and point a hyperlink at the name. Suggestions? I'm I just missing something in my formula? I don't have the D12 set as absolute. ($D$12)

  19. Nishu kumar says:

    hi good evening,
    please advice hyperlink create folder & excel file.

  20. Yury says:

    Nice article, thanks for that.
    Do you know if it's possible to edit screen tip for hyperlink() function? It's an option when hyperlink is added via Insert in ribbon but not sure if it's doable when a function is used.

  21. Tim Casey says:

    I use Excel based work instructions. I have a hyperlink built in which imports a "User list" of names of active people who use the work instructions. The list gets imported automatically so if the given employee is done with a given operation, they can click a drop down box and select their name to sign off an operation.

    The problem I have alot, is that if I save the network location into the link path (Even though I set it as UNC!!!) to the "User list" and my network path is on "X" letter drive, Excel updates the link as letter drive, even when I have it set to UNC. Now when the operator opens it on their PC and the letter drive is different, the hyperlink is automatically now broken.

    How can I set the link not to be clicked on to open, I just want the name list automatically imported to the hidden list that populates the drop down menu. but I need Excel to update the link as UNC not letter drive. I fix this dozens of times a day.

  22. D. Edmonds says:

    I'm using Office 365 and trying to insert a conditional hyperlink using the if statement but it doesn't work. Because I have many columns in my data sheet, I want to use the if statement to quickly look at a particular cell, if it meets the condition insert a hyperlink to another cell in the same sheet. The formula I am using is: =if(CF1="Blocked",hyperlink(CG1,"Blocked"),"")

    Not sure why it doesn't work - seems pretty straight forward

  23. Intrisk says:

    Brilliant. That saved me a HUGE amount of time.
    Thank you so much!

  24. Grace says:

    I have around 800 PDF files that I need to attach to the excel sheet as hyperlinks. Is there a way that I can batch insert these files to the sheet and not have to go through manually inserting these items to the cells?

  25. Adil says:

    Please, could anyone help me out with the hyperlink? Is there any way to add hyperlinks for 50 excel files in one go.
    In the Excel sheet.
    1)Invoice A Link (A Excel file.xlsx
    2)Invoice B Link (B Excel file.xlsx
    3)Invoice C Link (C Excel file.xlsx
    Continue till 50)

  26. firoz says:

    how to change bulk txt into hyperlink at one click

  27. Krishna R J says:

    I have a file containing Invoice No. ( Manually enter in Sheets ) with different file ( Excel file ) name in different directory .
    I want to assign a hyperlink to respective Invoice no , what is the short cut for the same.
    For Example
    Excel file contains Column A - 1 to 10 numbers
    and in one of directory contain 1 to 10 excel file ( Invoice format ) how to hyperlink at a time when i click 1 in column A it should show me INVOICE NO. 1 Excel file

  28. Sekar says:

    Hi, i have dought on hyperlink, i will use concetate fonction using in herperlink, colums have same file name, i will use above function to view the listing link in another colums , it's working, but i cat link sub folders, give any idea,
    =Hyperlink(contecate("//file path/",file name or cell value,"file type"),"friendly name"))this formula i have using, pls give any suggestions for sub folders

    • J says:

      This should work fine to link to sub-folders, as long as you are specifying the correct full file-path and ending it with "\" in place of the filetype. e.g. if cell A1 contained the name of the subfolder that I wanted to open instead of a file, then I would use =hyperlink(concatenate("\\filepath\",A1,"\"),"Friendly name")

  29. Anbu says:

    I have many sub folder, i want link exact match in colum A:A find, pls give sub folder view folmula

  30. Ariv says:

    Hi, i prepare one excel sheet hyperlink for my projects its more than 300 projects now my hyperlink is not working when i clink any project name in excel sheet its showing "can't open specified file" like that can you help me? to solve this issue.

  31. SUMIT JAIN says:

    I'm having the same problem as Lisa (post 7. When I use the hyperlink function to point to a cell on another sheet in the same workbook, the hyperlink doesn't adjust dynamically with the cell when it is moved. I.E. I use the formula =HYPERLINK("#'Calcs. Form'!D12","1-100"), but if I delete cell D11 on the 'calcs. form' and my 'D12' cell moves up, my hyperlink still points to D12 instead of moving up to D11. The only solution I have found is to actually give the cell a unique name, via define name, and point a hyperlink at the name. Suggestions? I'm I just missing something in my formula? I don't have the D12 set as absolute. ($D$12)

  32. How says:

    I created hyperlinks in my excel workbook to link to a specific place in the same workbook, i.e. the note numbers in the balance sheet of the financial statements are hyperlinked to the actual note disclosure. However, every time I insert some new lines into the workbook, the hyperlink does not automatically update it's reference to the new cell. How can I fix this? It is very time-consuming to update each hyperlink again after new rows inserted.

    Please advise

  33. Asfaw Belay says:

    How to operate using hyperlink?

  34. Wonder Woman says:

    I have an excel worksheet and I need to hyperlink to documents that are labelled the same name but to the latest revision in bulk.
    I have a folder of hundreds of pdfs labelled like this example and I want to run some code to hyperlink to my spreadsheet from the folder of pdfs.

  35. Phil says:

    Just curious, is there a way to assign the hyperlink to an Icon or shape?

  36. Armen says:

    How can I combine 3 different cells in one which contains texts with a hyperlink? when I do this hyperlinks disappeared

  37. Fatih Anıl says:

    Thank you Svetlana, this post is perfect for me to fill gaps with hyperlink function knowledge.

  38. Predeesh says:

    How to automatically derive a particular data by importing delimited data from another tool.
    Example. I have 6 categories of rooms and their revenue report from another tool as delimited data,
    I need only 4 category room revenue in my main excel sheet.

Post a comment

Thank you for your comment! When posting a question, please be very clear and concise. This will help us provide a quick and relevant solution to your query. We cannot guarantee that we will answer every question, but we'll do our best :)