The Excel Hyperlink function creates a hyperlink to a specified location.
The syntax of the function is:
where the arguments are as follows:
|link_location||-||The address to link to.|
An optional argument that provides the text to display in the Excel cell.If the [friendly_name] argument is omitted, the link_location text is displayed in the cell.
The address supplied for the link_location argument can be an absolute reference or a relative reference. The difference between these two reference types is shown in the table below.
C:\Documents and Settings\User1\ExcelFile1.xlsx
Refers to the referenced file's location relative to the current directory.
is equivalent to the absolute reference:
Also, within a relative reference, ..\ is used to specify the directory above the current one.
means "move up one directory and from there, access the file ExcelFile1.xlsx"
Excel Hyperlinks are an excellent way of organising your data. This is shown in the spreadsheet below, which collates details of sales invoices, and uses the Excel Hyperlink function to create links to individual invoices:
Note that, in the above example, the hyperlink in cell B2 uses an absolute reference, while the hyperlink in cell B3 uses a relative reference.
As the current spreadsheet is located in the directory C:\Invoices, the hyperlink functions in cells B2 and B3, create links to the files Invoice_B001.pdf and Invoice_B002.pdf, both of which are located in the directory C:\Invoices.
For further details and examples of the Excel Hyperlink Function, see the Microsoft Office website.