Article ID: 151323 - View products that this article applies to.
This article was previously published under Q151323
In Microsoft Excel, the INDIRECT worksheet function returns the contents of the specified reference and displays its contents. The INDIRECT worksheet function can be used to create linked references to other workbooks. Each attribute of the reference (workbook name, worksheet name, and cell reference) can individually be referenced using the INDIRECT function to create a user-defined dynamic reference using worksheet cell references as inputs.
The INDIRECT function will only return the result of a reference to an open file. If a workbook that the INDIRECT function is indirectly referencing is closed (not open in memory) the function will return a #REF! error.
The following examples create a reference to a workbook using three different cell inputs as references for the workbook, worksheet, and cell link.
Example 2The formula in Example 1 could alternately be written using multiple INDIRECT statements as follows:
NOTE: In Microsoft Excel for the Macintosh, omit ".xls" from the formula, as in the following example:
Note the difference in referencing the cells. Example 1 references cells A1, A2, and A3 without using quotation marks, while Example 2 references the cells using quotation marks around the references.
In the INDIRECT function, referencing cells without using quotation marks evaluates the result of the cell reference. For example, if cell A1 contained the text "B1" and B1 contained the word "TEST", the formula =INDIRECT(A1) would return the result "TEST". Referencing a cell with quotation marks returns the result of the cell contents. In the example in the previous sentence the formula would return the text string "B1" and not the contents of cell B1.
For more information about the INDIRECT function, choose the Search button in Microsoft Excel help reference and type:
Article ID: 151323 - Last Review: August 17, 2005 - Revision: 1.3
Contact us for more help
Connect with Answer Desk for expert help.