Microsoft KB Archive/78156

{| = Excel: Results of CELL Function Vary When Active Cell Changed =
 * width="100%"|

Last reviewed: November 3, 1994

Article ID: Q78156 The information in this article applies to:
 * Microsoft Excel for Windows versions 2.x, 3.0 and 4.0
 * Microsoft Excel for OS/2 versions 2.2, and 3.0

SUMMARY
The CELL function in Microsoft Excel is used to return information about the formatting, location, or contents of the upper-left cell in a reference. The CELL function takes two arguments. The second argument is a reference for which the CELL command will return information. If this argument is omitted, it defaults to the active cell.

MORE INFORMATION
Note that the active cell does not refer to the cell that the function is entered into. The active cell is whichever cell is currently selected. Therefore, the CELL function will always return information about the currently selected cell, even if that cell is on a separate worksheet. To cause the CELL function to refer to the cell in which the function resides, include that cell's reference as the second argument to the CELL function. This will not result in a Circular Reference error message.

Example

 * 1) Enter the formula =CELL(&quot;row&quot;) into cell A1 of a worksheet. The value 1 (for the current row) is returned.
 * 2) Select cell A2 and press F9 to calculate the worksheet. Because the CELL function is a volatile function (recalculates every time a calculation is made), it will update and return the number 2 (the current row).

This functionality is by design, but may be confusing if you are expecting the function to always return information about the cell into which the function is entered.