Microsoft KB Archive/120041

{|
 * width="100%"|

AutoFit/Best Fit Commands Work Incorrectly With Hidden Cells

 * }

-

The information in this article applies to:


 * Microsoft Excel for Windows, versions 4.0, 4.0a, 5.0

-

SYMPTOMS
In Microsoft Excel version 5.0, if you format a cell with the Center Across Selection, and Wrap Text formatting, and you hide the column that contains this cell, the AutoFit command works incorrectly for the row that contains this hidden cell. If you hide the row that contains this cell, the AutoFit command works incorrectly for the column that contains this hidden cell.

In Microsoft Excel versions 4.0 and 4.0a, if you hide the row that contains the cell with this formatting, the Best Fit button in the Column Width dialog box works incorrectly for the column that contains this hidden cell.

CAUSE
This behavior occurs only when the hidden cell contains both the Center Across Selection and the Wrap Text formatting. When you use the AutoFit command with the row or column that contains this hidden cell, the row height or column width increases incorrectly. The resulting height or width depends on the length of the data that is contained in the hidden cell; that is, the greater the length of the data contained in the hidden cell, the greater the height or width increases using AutoFit.

This behavior also occurs when you double-click the border to the right of the column heading, or the border above the row heading to set the column width or row height.

WORKAROUND
To avoid this behavior, you must use the Row Height or Column Width dialog boxes to change the height of the row or the width of the column that contains the hidden cell.

STATUS
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in a later version of Microsoft Excel.