The XL3Link() formula helps users easily build linked analysis into their reporting, as described in the diagram below from Stephen Few's book on Information Dashboard Design.
The formula has two main functions. Firstly it jumps to another location in the workbook, like a hyperlink, and secondly it passes parameters held in one cell(s) into another cell(s).When you follow the hyperlink, XLCubed jumps to the sheet stored at LinkLocation and sets the parameters at the specified parameter addresses. Since selections for XLCubed Grids and formulae can be based on the content of a cell, they can update to reflect the passed parameter immediately.
Use the Insert Formula > XL3Link menu or ribbon item to insert the formula using a wizard. More details can be found here.
XL3Link( [LinkLocation], [FriendlyName], [LinkType], [Range1], [Value1],…, [Range13], [Value13] )
|LinkLocation||A piece of text, indicating the location to jump to. Can be a text string enclosed in quotation marks or, more commonly, an XL3Address formula.
Can also be a web url if it starts with http:// or https://.
|FriendlyName||The jump text or numeric value that is displayed in the cell. If FriendlyName is omitted, the cell displays the LinkLocation as the jump text|
|LinkType||The type of link. If Hyperlink is used, the cell is formatted with the Excel style Hyperlink
|Range1,…, RangeN||A reference to a cell where the following Value is placed when the jump is executed. Usually an XL3Address formula|
|Value,…, ValueN||The value that will passed to the corresponding Range|
For a type 4 link, the following are the valid values for the link location argument. (Version 8)
Version 9 adds the following options:
|"SAVETOEXCELFIXEDSHEET"||(Optional) Argument after LinkType is the sheet to save, if not provided the active sheet is saved.|
Version 10 adds the following options:
Some range names are treated specially by XLCubed.
XL3Tooltip - The associated value is used as the tooltip, no range is updated. This is available from (Version 8.1).
XL3Target - The target frame for http(s) links. This is available from (Version 10).
XL3UndoEditedFormulae - Applies only to web when the XL3Link submits changes. When set to TRUE any cells with formulae that are changed will have their formula restored after the link has been activated.
The following XL3Link formula creates a hyperlink to the 'LinkTarget' sheet and shows in the hyperlink the text "Jump to Target Sheet"
=XL3Link( XL3Address( LinkTarget!A1 ), "Jump to Target Sheet" )
You can use XL3Link to jump from one sheet to another sheet in the workbook, while passing some parameters. The following formula jumps to the sheet 'LinkTarget' and sets value 'Car and Bike Stores' at LinkTarget!A2.
=XL3Link( XL3Address( LinkTarget!A1 ), "Jump to Target Sheet and pass 'Car and Bike Stores'", 1, XL3Address( LinkTarget!A2 ), "Car and Bike Stores" )
The XL3Link formula below creates a tool tip by passing the parameter XL3Tooltip and sets the tool tip text to be "This is a tool tip"
=XL3Link(XL3Address(LinkTarget!A1),"Tooltip example",,"XL3Tooltip","This is a tool tip")
Usage with IF()
Sometime you may want to have the parameters to the XL3Link() function depend on other criteria in thw workbook. You can do this, but it is important to only have one XL3Link() in your formula, so
=XL3Link("Sheet1!A1",IF(A2, "Text 1", "Text 2"),,"Sheet1!A3",IF(A2, "value 1", "value 2"))
=IF(A2, XL3Link("Sheet1!A1","Text 1",,"Sheet1!A3","value 1"), XL3Link("Sheet1!A1","Text 2",,"Sheet1!A3","value 2"))
This is because the Link is registered when the XL3Link formula is evaluated, and in the second case both Links will be registered for the same cell, so you will not get the required result.