Microsoft KB Archive/81201

{|
 * width="100%"|

-

The information in this article applies to:


 * Microsoft Excel for Windows, versions 2.x, 3.0, 4.0
 * Microsoft Excel for OS/2, versions 2.2, 3.0
 * Microsoft Excel for the Macintosh, versions 2.x, 3.0, 4.0

-

SUMMARY
The &quot;Microsoft Excel Function Reference&quot; describes many functions as returning a reference. These include ABSREF, ACTIVE.CELL, INDIRECT, LAST.ERROR, OFFSET, SELECTION, and TEXTREF. When functions are entered by themselves into a cell, the value of the cell will be the value contained in the reference returned by the function, not the reference itself. This is because the value of a cell must be a number, text, logical value, or error value; a reference is not a &quot;value.&quot;

MORE INFORMATION
The &quot;Microsoft Excel Function Reference&quot; documents that reference-returning functions display the value contained in the reference. Although the value is displayed, the reference is still returned.

Example
A good way to see a reference returned by a function is to use the REFTEXT function to convert the reference to a text string.  Enter the following onto a macro sheet: A1: =OFFSET(A1,3,0) A2: =REFTEXT(OFFSET(A1,3,0)) A3: =RETURN A4: TEST Select cell A1 on the macro sheet. From the Macro menu, choose Run. Choose OK. Press CTRL+LEFT QUOTATION MARK (`) to make the sheet display values. The values should show as follows:  A1: TEST A2: R4C1 A3: TRUE A4: TEST</li></ol> </li></ol>

While the OFFSET in cell A1 appears to have only returned the text value in A4 and not the reference, the REFTEXT function in A2 shows that the OFFSET did indeed return the correct reference.