In Microsoft Excel for Microsoft 365, a #VALUE! error from HYPERLINK usually means Excel cannot interpret the link target or an input used to build it. If A2 contains a valid web address and B2 contains the text to display, use =HYPERLINK(A2,B2); then check the target and its source cells if the error remains.
What the HYPERLINK formula does
HYPERLINK creates a clickable link in a worksheet. Its syntax is HYPERLINK(link_location, [friendly_name]). The required link_location tells Excel where to go; the optional friendly_name is the text shown in the cell. If you leave out the friendly name, Excel displays the link location itself.
The destination can be a website, an email address, a file path, or a location in the current workbook. For a fixed website address and a custom label, with no cell references required, use =HYPERLINK("https://example.com","Open the website"). This should display “Open the website” as clickable text. The formula creates the link; it does not check whether the website is online or whether your account has permission to access the destination.
A useful distinction: a formula error is not the same as a link that opens to an error page. #VALUE! appears in the worksheet when Excel cannot evaluate the formula successfully. If the cell displays clickable text but clicking it leads to a missing page or inaccessible file, the formula may be fine and the destination itself needs attention.
Check the target before changing the formula
Start with the value that link_location produces. If it comes from a cell, select that cell and inspect the formula bar for extra spaces, missing characters, or an unexpected error. A target cell that contains #N/A, #VALUE!, or another error can pass that error into a formula that depends on it.
For a web link, check that the address is complete and begins with a suitable protocol, such as https://. A familiar-looking domain without the protocol may not be interpreted as intended in every context. For a file link, verify that the path is spelled correctly and that the file or shared folder exists. For an email link, use the mailto: form. A valid-looking formula cannot make an unavailable file or an invalid web address work.
Also check for leading or trailing spaces in a cell-based target. These can be hard to spot on screen and may make a generated destination invalid. If you suspect whitespace, examine the source value directly or test a cleaned version in a spare cell before changing the original data. Avoid deleting characters blindly: spaces can be meaningful in some file names or parts of a link.
Common causes of #VALUE! and how to diagnose them
There is not one universal correction for every #VALUE! result. The error may come from the target itself, a formula that constructs the target, or another referenced value. Work through the formula from its inputs toward the final link instead of replacing the whole formula at once.
- Invalid or incomplete destination: Check the complete URL, email address, workbook location, or file path. If possible, test the destination as plain text or open it independently.
- An upstream formula error: If the target or friendly name is calculated, inspect those source cells. Correct the first error in the chain, rather than masking the final result.
- Unexpected text in a generated address: A lookup result, space, punctuation mark, or missing separator can change the address. Compare the generated target with a known-good example.
- Incorrect formula construction: Check that the opening and closing parentheses match and that arguments are separated correctly for your Excel regional settings. A syntax problem may show a formula-entry warning rather than
#VALUE!, so note the exact message. - Wrong cell references: Confirm that the formula points to the intended target and label cells. A copied formula may have shifted a relative reference to a blank or unrelated cell.
To narrow down the cause, temporarily put the target expression in a separate cell and inspect the result as text. If that test cell shows an error, the issue is upstream. If it shows a plausible address, test the link with that address directly. You can also select part of a formula in the formula bar and press F9 on Windows to evaluate the selected expression; press Esc afterward so Excel does not replace the selected expression with its calculated value. On Mac, keyboard shortcuts can vary by keyboard and system settings, so use the formula bar and a temporary test cell if F9 does not behave as expected.
Fix links generated from worksheet data
Many workbook links are built from a table: one column holds the destination and another holds a readable label. With a URL in A2 and its display label in B2, =HYPERLINK(A2,B2) keeps the destination and the visible text separate. That makes it easier to update a link or label without rewriting a long formula.
For a link within the same workbook, the destination uses a location reference beginning with #. For example, to link to cell A1 on a sheet named Sales Data, with no cell-based inputs, use =HYPERLINK("#'Sales Data'!A1","Open sales"). The single quotation marks are part of the internal sheet reference and are needed here because the sheet name contains a space. If you rename the sheet, check whether the text inside the link still points to the intended location.
If a row can have no destination, prevent Excel from trying to create a link from an empty target. With the URL in A2 and the display label in B2, use =IF(A2="","",HYPERLINK(A2,B2)). This returns an empty string when A2 is blank and creates the hyperlink when A2 contains a value. It is a useful display improvement, but it does not validate a nonblank address; an incorrect target still needs to be corrected.
Build dynamic URLs carefully
Combining cell values into a URL is convenient, but it creates more opportunities for a bad target. For example, with a base address that has no existing query string in A2 and a record ID in B2, use =HYPERLINK(A2&"?id="&B2,"Open record"). If A2 contains https://example.com/record and B2 contains 42, the constructed target is https://example.com/record?id=42, and the displayed link text is “Open record.”
That example assumes the base address does not already contain a question mark introducing query parameters. If it already has a query string, adding another ? may produce an unusable address; the additional parameter usually needs to be joined with & instead. Values that contain spaces, ampersands, or other reserved URL characters may also need encoding according to the website’s requirements. Excel does not know the intended meaning of every site’s parameters, so verify the finished address before relying on it.
When a long formula is hard to inspect, separate the work: build the destination in one cell, review it, and then point HYPERLINK to that cell. This makes it easier to distinguish a problem in URL construction from a problem in the hyperlink formula. It can also help when several rows use the same link-building pattern.
Use error handling without hiding the cause
IFERROR can replace an error with a message, but it does not repair the destination. With the URL in A2 and the label in B2, use =IFERROR(HYPERLINK(A2,B2),"Check link") if showing a prompt is more helpful than displaying an error. In this example, Excel displays “Check link” when the expression returns an error. The replacement text is not a clickable hyperlink.
During troubleshooting, it is often better to leave the error visible so you can find which input caused it. Use error handling when you have a deliberate user-facing reason to suppress the error, and make the replacement message specific enough to guide someone toward the missing or incorrect data. Avoid wrapping a whole complicated calculation in IFERROR if that would conceal unrelated problems in the workbook.
Excel for Windows, Mac, and the web
The basic HYPERLINK function is used across Microsoft Excel for Microsoft 365 on Windows, Excel for Mac, and Excel for the web. A formula that works in one version can still behave differently when someone clicks a link: Windows and Mac may use different default browsers or file-handling settings, while browser-based Excel has limits tied to the browser and its access to local files.
In Excel for Microsoft 365 on Windows, enter or edit the formula in the worksheet or formula bar and press Enter. If you share the workbook, consider whether recipients can access the destination: a local path on your computer will not automatically point to the same file on another person’s computer. A shared, permissioned location is generally more suitable for links intended for a team. On Mac, verify that file links point to locations available on that Mac. In Excel for the web, test the link in the browser and confirm that the destination is accessible there; local desktop file paths may not work as they do in the Windows application.
Regional settings can also affect how formulas are typed. Some installations use semicolons between function arguments instead of commas. If Excel rejects a formula at entry, check the separator convention used by that installation. The examples here use commas, as in the standard English-language syntax.
When to use a different approach
If the goal is simply to make a URL clickable, typing a complete web address into a cell may be enough; Excel can recognize many addresses as links automatically. Use HYPERLINK when you need custom display text, a destination assembled from cells, or a link to a particular place in the workbook.
If a cell already contains a hyperlink but you need to change where it goes, inspect whether it was created by a formula or through Excel’s link-editing interface. Editing the formula is appropriate for a formula-generated link; a manually inserted link may need to be edited through the link controls instead. Do not assume that changing the displayed text changes the destination: friendly_name controls what the cell shows, while link_location controls where it points.
Frequently Asked Questions
Does #VALUE! mean the website is offline?
No. It means Excel could not evaluate the formula as entered. The destination may be invalid, or a source cell may contain an error. A website that is offline more commonly causes a problem after you click a valid link.
Why does my HYPERLINK formula show the address instead of my label?
If you omit the optional friendly name, Excel displays the link location. To show a custom label, provide a second argument, such as B2 when the target is in A2: =HYPERLINK(A2,B2).
Can HYPERLINK open another worksheet in the same workbook?
Yes. Use an internal location that begins with #, such as =HYPERLINK("#'Sales Data'!A1","Open sales") for cell A1 on a sheet named Sales Data. Confirm that the sheet name and cell reference are correct.
Why does a link work on my computer but not for a coworker?
The formula may point to a local file, private folder, or location the coworker cannot access. Check the path and sharing permissions, and use a shared destination if the workbook is meant for multiple people.
Should I use IFERROR to remove the error?
Only if a replacement message is genuinely useful. IFERROR can hide the visible error, but it does not fix an invalid target or a broken source formula. Find and correct the cause first when the link is important.
Related
- Find and Replace in Word: Steps, Options, and Tips
- Find and Replace Capital Letters in Word
- Find and Replace Enter in Word: Paragraph Marks Explained
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Errors & fixes
- Excel Not Inserting Page Breaks? Fix the Print SetupIf Excel is not inserting a page break, first switch to View > Page Break Preview, select the…
- Excel 3D Map Not Working? Causes, Checks, and FixesIf Excel 3D Maps is not working, first confirm that you are using the Windows desktop version of…
- COUNTIF With a Cell Reference Not Working? FixesIf COUNTIF is not using your cell reference, check that the reference is not inside quotation marks: with…
- Excel: How to Prevent #REF! Errors When Deleting RowsExcel cannot guarantee that formulas will survive deleting the cells they refer to: those references can become #REF!.…
- How to Fix Borders in Excel: Quick, Reliable StepsTo fix a border in Excel, select the affected cell or range, go to Home > Borders, and…
- Excel File Not Opening? Fix the Blank Screen in ExcelIf Excel opens to a blank screen, first check whether the workbook window is hidden, then start Excel…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.