Excel: Results of CELL Function Vary When Active Cell Changed

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("row") 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.

REFERENCES

"Microsoft Excel Function Reference," version 3.0, pages 26-27


KBCategory: kbusage
KBSubcategory:

Additional reference words: 2.0 2.00 2.01 2.1 2.10 2.2 2.20 2.21 3.0
3.00 4.0 4.00


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 3, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.