To automatically adjust the column width based on the contents of the cell with the largest amount of data, do one of the following:
–Hover the mouse cursor over the right border of the column header so that the cursor takes the form of a two-sided arrow, and double-click.
–Right-click the column header and run the Fit width to content command from the context menu.
–Right-click the column header and run the Column width command from the context menu. In the Column width window, select Adjust automatically and click OK.

To automatically adjust the row height based on the contents of the cell with the largest amount of data, do one of the following:
–Hover the mouse cursor over the lower border of the header so that the cursor takes the form of a two-way arrow, and double-click.
–Right-click the row header and the Fit height to content command from the context menu.
–Right-click the row header and run the Row height command from the context menu. In the Row height window, select Adjust automatically and click OK.

To automatically adjust the width or height of several columns or rows, follow these steps:
1.Select the required columns or rows.
2.Autofit width or height in one of the following ways:
•Hover the mouse cursor over the border between any two column or row headers in the selected range so that the cursor takes the form of a two-sided arrow. Double-click.
•Right-click the header of any column or row in the selected range and run the Fit width to content or Fit height to content command from the context menu.
•Right-click the header of any column or row in the selected range and run the Column width or Row height command from the context menu. In the window that opens, select Adjust automatically and click OK.
For each column/row in the selected range, the width/height will be selected according to the contents of the cell with the largest amount of data.