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.
Excel HYPERLINK function - syntax and basic uses
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 365 - 2000. In Excel Online, the HYPERLINK function can only be used for web addresses (URLs).
The syntax of the HYPERLINK function is as follows:
Where:
- 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:
=HYPERLINK(B2, A2)
The result may look something similar to this:
More formula examples demonstrating other uses of the Excel HYPERLINK function follow below.
How to use HYPERLINK in Excel - formula examples
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.
How to link to sheets, files, web-pages and other items
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:
"Drive:\Folder\Workbook.xlsx"
For example:
=HYPERLINK("D:\Source data\Book3.xlsx", "Book3")
To land on a specific sheet and even in a specific cell, use this format:
"[Drive:\Folder\Workbook.xlsx]Sheet!Cell"
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:
"[Drive:\Folder\Workbook.xlsx]Sheet!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:
"Drive:\Folder\File_name.extension"
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:
"\\Server_name\Folder\File_name.extension"
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("https://www.ablebits.com","Go to Ablebits.com")
The above formula inserts a hyperlink, titled "Go to Ablebits.com", 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:
"mailto:email_address"
For instance:
=HYPERLINK("mailto:support@ablebits.com","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.
Vlookup and create a hyperlink to the first match
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:
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.
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:
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:
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.
How to edit multiple hyperlinks at a time
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 (old-website.com) with the new one (new-website.com) in all hyperlinks on the current sheet or in the entire workbook. To have it done, please follow the steps outlined below:
- Press Ctrl + H to open the Replace tab of the Find and Replace dialog.
- In the right-hand part of the dialog box, click the Options button.
- In the Find what box, type the text you want to change ("old-website.com" in this example).
- 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.
- In the Look in drop-down list, select Formulas.
- As an extra precaution, click the Find All button first, and Excel will display a list of all formulas containing the search text:
- 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.
- In the Replace with box, type the new text ("new-website.com" in this example).
- Click the Replace All button. Excel will replace the specified text in all found hyperlinks and notify you how many changes have been made.
- 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.
Excel HYPERLINK not working - reasons and solutions
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:
- 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.
- 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!
Practice workbook for download
Excel Hyperlink formula examples (.xlsx file)
73 comments
Hi Svetlana,
Thanks for your suggestions but I believe, editing multiple hyperlinks at a time is not working on O365
I exactly did what you've suggested but it doesn't find the word I'm looking for to replace it.
Is there any other suggestion for multiple hyperlinks editing in one go?
Thanks,
Hi! Changing a hyperlink using the Find and Replace dialog works if the hyperlink is created using a formula. If the hyperlink is created using the Insert Hyperlink dialog, you can modify it using this dialog or VBA.
=HYPERLINK(CONCATENATE("\\SANJAY\SANJAY ALL BACKUP\SCAN INVOICES\ATLANTA 2021\",B284,".pdf"))
if pdf file not fond than show error or blank
Please advise formula
want to mass update hyperlinks connected to network drive.
Spreadsheet is stored on SharePoint and contains information about certain videos I have stored on a network drive.
If I use the =HYPERLINK formula and type the full path of where the video is stored on the network drive, link name e.g.
=HYPERLINK(\\192.168.0.6\video_folder\video1.mp4,VIDEO1) then the link works fine.
all videos are stored in \\192.168.0.6\video_folder\ just the name of the video changes
I have tried to use & and CONCATENATE with the HYERLINK formula to try and mass update all other rows and it fail everytime
Have to use IP address as not everyone accessing the network drive will do so using the same drive letter. Makes no difference if I use the server name instead of the IP address
Hello,
I have an excel workbook that acts as a visual navigation tool to various documents within a SharePoint site. For example, a user clicks on a specific area/region/location etc to drill down to certain documentation based on their navigation choices.
Due to the amount of documentation that is stored in SharePoint, I have added a worksheet for a Glossary which I want to have as the main link source for the workbook so that when I update the hyperlinks to the documents in the Glossary, these links will also update in other areas of the workbook.
I have tried using the 'equals' the specific cell formula, however, this does not provide me with a hyperlink to click to the document, I have also tried the '=Hyperlink' formula to the relevant cell in the Glossary page, however, this tells me "This site can’t be reached....."
SIMPLE EXAMPLE
User clicks a country (England, Ireland, Scotland, Wales) from the home sheet (lets say Sheet 1)
If the user clicks England, they go to sheet 2 which provides more options (Cheshire, Leicestershire, Birmingham, Manchester etc)
The user is then presented with more options on sheet 3 (e.g. population, transport, etc)
If the user clicks 'population', they are then presented with various documentation that they can open from SharePoint by clicking a hyperlink (its this hyperlink that I want to update if I update the hyperlink in the main source within the Glossary worksheet) rather than having to update the hyperlinks all throughout the workbook as there will be various ways in which the user can navigate to the specific documentation
Hope this makes sense, if anyone can help please :)
Hi!
You can create a dynamic hyperlink using a formula like this
=HYPERLINK("#'"&A1&"'!"&B1)
A1 - "Sheet1" (worksheet name)
B1 - "C1" (cell address)
I have a spreadsheet with new tabs that i copy and paste to update every month. Those tabs have links within the sheet that link to other locations in that SAME sheet ('Place in This Document'). I am looking for a simple way to update those links without clicking on the cell each month and updating the hyperlink.
I have tried Find and Replace and that does not work. I am assuming i need to do VBA coding but i'm not sure what i need to do.
Thanks!!
Hi!
If I understand the problem correctly, try using a cell reference that contains the link's address.
=HYPERLINK(E1,"Link to A1")
E1 --- #A1
Looking for a little help.
I have a macro that creates a new sheet (we'll call it '221234-1') based on a particular cell value, then hides the new sheet and returns back to the starting sheet. Back at the starting sheet, a small icon is copied/pasted in a specific location. What I'm needing is the VBA to hyperlink the icon to that sheet ('221234-1') based on that same cell value. Basically, the cell value will change each time a new sheet is create ('221234-2' '221234-3' '221234-4' and so on) so the VBA will need to look back to that cell (EV36) to get the worksheet address of the new worksheet that was just created.
I created an excel sheet for my website passwords. It has a Website Name in Column A and Website URL in Column B.
I only want the url hyperlink under the website name. I can change the Text to Display under LINK options, but it is time consuming. Is there a script that will do it all at once? I did try a VBA script but it still only changes one at a time.
Hello!
Use a VBA macro to display all hyperlinks in an adjacent column.
Sub HyperlinkExtract()
With ActiveSheet
For I = 1 To .Hyperlinks.Count
.Hyperlinks (I).Range.Offset (0,1).Value = .Hyperlinks (I).Address
Next I
End With
End Sub
Hello!
I was hoping to have some help with creating a recurring formula to link to multiple different worksheets within the document.
=HYPERLINK("#Sheet2!A1", "Sheet2")
So this, but instead of naming the sheet (Example sheet name: 244) in the formula, to instead tell the formula to look at cell A3 which contains the the title of the worksheet (244).
Then again, wanting to name the hyperlink as according to the same cell, A3, so it returns with the name of the sheet as the Hyperlink (244)... visual example...
A B
No# Link
3 244 =hyperlink("#(LINK TO A3)!A1","(LINK TO A3)")
4 245 =hyperlink("#(LINK TO A4)!A1","(LINK TO A4)")
5 246 =hyperlink("#(LINK TO A5)!A1","(LINK TO A5)")
6 247 etc.
Thanks!
Hello!
To create a dynamic hyperlink, use the recommendations from this article: How to create external reference in Excel to refer to another sheet or workbook.
Please try the following formula:
=HYPERLINK("#"&A3&"!A1", "Link to "&A3)
I need help. I am hoping there's a formula or someway to do what I am needing to do on a spreadsheet. A temp employee (who is no longer with us) created a spreadsheet for our boss with some info she wanted in hyperlink form. The spreadsheet has over 400 "hyperlinks" but the issue is the person who created it didn't do the hyperlinks correctly.
Here's 2 example of what the hyperlink should look like (using generic websie info)..Boss told the temp he could do it either way
Option 1: ht tp://www.clickme.com/vinyl1
Option 2: Vinyl Color 1 (when you click on it it opens to ht tp://www.clickme.com/vinyl1
His "hyperlinks" look like this 1, ht tp://www.clickme.com/vinyl1 2. ht tp://www.clickme.com/vinyl2 (you get the drift) and they don't even show up as hyperlinks. If I go into each cell and delete the info before the http part like 1. or 2. and then hit enter it turns into a clickable hyperlink. I need a way to do them all at once instead of doing all 400+ one at a time.
I bet this is the reason he didn't show back up to work the day after sending them to our boss.
Help!
Thanks!
Corryn
Hello!
The information you provided is not enough to understand your case and give you any advice, sorry. Please specify exactly what formula is written in these cells. Then I'll try to help.
If other programs created the excel file with correct formula for hyperlink, the cell only display the formula. You still need to click each cell then hit enter to make it clickable. Is there a way to avoid this step? Image some computer program created 10K hyperlinks in a sheet, there is no time to click each one to convert it from formula to links.
Hi!
Unfortunately, without seeing your data it is difficult to give you any advice.
I have 2 excel sheets one with old prices and one with new updated prices.
Both with a SKU, title and price [old] and [new]
I need to compare skus and if they match then move compare prices, if there has been an increase in price in [new] it needs to update this price in [old]
Each sheets holds around 3000 items so an automatic formula would be great please, can you help.
Thanks in advance
Hello!
To find the new price on another sheet for each SKU, you can use the VLOOKUP function and this guide: How to VLOOKUP across multiple sheets in Excel.
I'd recommend you to have a look at our Excel VLOOKUP Wizard. It is available as a part of our Ultimate Suite for Excel that you can install in a trial mode and check how it works for free.
Hello,
Thanks for the formula tip for linking to a bookmark in a Word doc! The template you provided works! Pasted below for reference:
=HYPERLINK("[D:\Word files\Price list.docx]Subscription_prices","Price list")
I am attempting to batch create links based on the inputs. For example, I'm replacing the Bookmark_Name ("Subscription_prices") with a xlookup formula, and replacing the File Name ("Price list.docx") with another xlookup formula. But for some reason this breaks the link to the bookmark. The link still functions to the Word file, but doesn't bring you to the specific bookmark within the Word file.
Any ideas how to make this work?
Hi!
I can't see your data and can't guess which XLOOKUP formula you are using. Therefore I can't check your formula. Check what data is returned by your formula. There may be extra spaces or other characters.
Hello,
Is there a way I can make an index with hyperlinks works when saved as pdf?
I want the links to work in pdf, not necessarily to work in excel, but should be done in excel.
Thank you
I have a document where i get live data from another document via power query, its a big dataset of over 500 projects (Rows).
I have then made a Gantt chart in another sheet in the document, and I would like to make a link on the far left were i can press (item number) to get to the specific line where the data that i get through power query is on the project within the same workbook.
Whenever a new project is added in the original document where the original data is at, it is sorted by name of item number, which means that a newly added project might become number 344 or something which pushes every project with a higher number than 344, 1 row down.. therefore when i add hyperlinks, it will quickly be moved around and the links will refer to wrong cells in the worksheet.
Can i make the hyperlink refer to a specific value in a cell instead of the actual cell, so instead of hyperlinking to cell A1 or whatever then hyperlink to the item number value in the other worksheet? so something like #04815.
or do you have any suggestion on some other fix of the moving projects part? :)
also, for each imported project, it fills 1 row, but in the Gantt chart sheet i have added 2 rows for each project, and it understands to get the data and I'm able to drag and drop it all the way down using this formula:
=I$2>INDIRECT(ADDRESS(FLOOR.MATH((ROW(GANTT!$B2)-1)/2+2;1);28;;;"GANTT"))
Where I$2 is todays date. And the GANTT!$B2 is referring to the data sheet called GANTT.
do you have any suggestions on making the hyperlinking draggable where it skips every other row in the Gantt sheet? :)
Also, I need to make draggable hyperlinks referring project number to a folder called the same as the project number. any notes on how to make this work?
I am able to add hyperlinks by using formulas and the hyperlink button in excel, i don't have any experience using VBA, but if you think you know how to make a code to make any of this work, I'm willing to use time to try to get to understand it. None the less any help is appreciated
Kind regards
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")
Please help, what is the additional function/formula if the file is not available in the drive but I want to appear as "File Not Found!" in the cell?
Hi!
It is impossible to solve your problem with standard Excel tools. You need to use a VBA macro.
Thank you, can you share with me please the function?
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.
Hello!
Unfortunately, without seeing your data it is difficult to give you any advice.
I'd recommend you to have a look at Split text tool.
It can split delimited text into columns.
It is available as a part of our Ultimate Suite for Excel that you can install in a trial mode and check how it works for free.
Thank you Svetlana, this post is perfect for me to fill gaps with hyperlink function knowledge.
How can I combine 3 different cells in one which contains texts with a hyperlink? when I do this hyperlinks disappeared
Hello!
When cells are merged, only one content remains - the upper left.
Here is the article that may be helpful to you: Merge and combine cells in Excel without losing data.
I hope I answered your question. If something is still unclear, please feel free to ask.
Just curious, is there a way to assign the hyperlink to an Icon or shape?
Hello!
Please check out this article to learn how to Convert a worksheet object into a clickable hyperlink
Hope you’ll find this information helpful.
HI
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.
example.
1010-10-001r0
1010-10-001r1
1010-10-001r2
1544-10-001r1
1544-10-001r2
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.
thanks
Hello!
If I understand you correctly, you need to create a shortcut to the file in Windows.
Yes
How to operate using hyperlink?