Microsoft KB Archive/44022

{|
 * width="100%"|

Excel: CELL Function Doesn't Update When Formatting Changed

 * }

-

The information in this article applies to:


 * Microsoft Excel for Windows, version 4.0
 * Microsoft Excel for the Macintosh, versions 1.x, 2.x, 3.0, 4.0

-

SUMMARY
The worksheet function CELL in Microsoft Excel returns information about the formatting, location, and contents of a given cell. However, the formatting information (&quot;width&quot;, &quot;protect&quot;, &quot;format&quot;, and &quot;prefix&quot;) will not be updated once the function is entered unless other cell attributes (contents or location) are also changed.

This problem occurs because Excel does not use formatting dependencies. (It does not consider a cell changed unless its actual contents are altered.) This is done for speed considerations.

MORE INFORMATION
For example, if you enter =CELL(&quot;format&quot;,B1) into cell A1, with B1 formatted as General, then change the number format of B1 to 0.00, A1 will still contain &quot;G&quot; (for General). Entering 3.50 into B1 will cause A1 to update and display the correct value: &quot;F2&quot; (for Fixed 2 Decimal).

The CELL function was included for compatibility with Lotus 1-2-3 files. Lotus 1-2-3 handles the updating of the CELL function the same way.

Additional query words: 1.0 1.00 1.03 1.04 1.06 1.5 1.50 2.2 2.20 3.0

Keywords :

Version :

Platform :

Issue type :

Technology :