HYPERLINK makes a cell clickable. Click it and Excel opens the web page, file, email draft or workbook location named in link_location. Its main advantage over the Insert > Link command is that the link is a formula, so it can be built from other cells and filled down a whole column.
The arguments
- link_location is the destination. It can be a web address, a
mailto: link, a file path, a network path, or a spot in the same workbook, written with a leading # such as "#Sheet2!A1". - friendly_name is what the cell displays. Leave it out and the cell shows the destination text. The friendly name can be text, a number, or a formula result.
The value of the cell is the friendly name (or the link text), so other formulas can read it. The link itself is carried by the formula, not stored as a separate object.
Building links from data
The strength of HYPERLINK is joining text with &:
=HYPERLINK("https://example.com/orders/"&A2, "Open order "&A2) creates one link per row from an order number.=HYPERLINK("mailto:"&B2, "Email "&A2) opens a new email to the address in B2.=HYPERLINK("mailto:"&B2&"?subject=Invoice "&A2, "Email customer") fills in the subject as well.=HYPERLINK("#B"&MATCH(F1, B:B, 0), "Go to match") jumps to the cell where a value was found, when you pair it with MATCH.=HYPERLINK("#'"&A2&"'!A1", A2) makes an index of sheet names that jumps to each sheet.
Linking to a place in the same workbook uses a # in front, then the sheet and cell. A sheet name with spaces needs single quotes.
Using links safely
Clicking a link to a file or web address can run outside code, so Excel may show a security notice before it opens an external link, and it may block some file types. Only build links to places you trust. If friendly_name is long, the cell may show part of it. Wrap text or widen the column.
To select a cell with a hyperlink without opening it, click and hold until the pointer changes, or click a neighbouring cell and move with the arrow keys.
Insert Link or HYPERLINK?
Insert Link (Ctrl+K) stores a fixed link and is simplest for one-off cases. HYPERLINK is better when links must be generated from a list, change with a cell, or sit inside a table that grows. The HYPERLINK cell also keeps its link when you sort or filter, because the formula travels with the row.
HYPERLINK doesn't test whether the target exists. A misspelt address still produces a clickable cell, which fails only when someone clicks it.