Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, and 2013. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Random Width and Height Changes.

Random Width and Height Changes

by Allen Wyatt
(last updated January 3, 2015)

3

Gary has a workbook set up with twelve worksheets, one for every month. He has framed the information in these worksheets so it just fits on his screen. At some point he opens his workbook to find that the June column widths have expanded so that they don't all fit on his screen. It is only the June columns that expand, but all worksheets will have their row heights expand from 12.75 to 13.50. If Gary resizes everything back so it once more fits his screen, everything is fine for a week or so, and then the resizing happens again.

It is unclear what might be causing this problem, but there are a few things you can check. If the workbook is stored on a network, where it can be accessed by other people, it could be that the change is occurring while someone else has the workbook open. In addition, if the workbook is opened on different machines, it could be that the other machines on which it is opened may be affecting the workbook, provided they have different screen resolutions or different printer fonts installed.

Being unsure as to the cause, it may be that the best solution is to create a macro that runs automatically when the workbook opens. This macro could go through the worksheets and set the column widths and row heights to what you need The following macro will perform these steps:

Private Sub Workbook_Open()
    Dim wSheet As Worksheet

    For Each wSheet In Worksheets
        ' Change range to reflect columns and rows you need to affect
        With wSheet.Range("A1:A15")
            .ColumnWidth = 12     ' Change to column width desired
            .RowHeight = 13       ' Change to row height desired
        End With
    Next wSheet
End Sub

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (8774) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel here: Random Width and Height Changes.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He  is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Aligning Positive and Negative Whole Numbers in a Column

When you use a table to present numeric information, you may want to have Word align the numbers in the table. This can be a ...

Discover More

Forcing a Workbook to Close after Inactivity

Tired of your workbooks being left open on the screen where they can be seen by anyone passing by? Here's a way to have Excel ...

Discover More

Hyperlink Formatting

Word, as you type, normally formats hyperlinks automatically. If you don't like the way that hyperlinks look in a particular ...

Discover More

Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!

More ExcelTips (ribbon)

Centering Your Worksheet

Got just a small amount of worksheet data to print out? It might look better on the printed page if you center it. Excel ...

Discover More

Changing Excel's Background Color

Excel does not provide a built-in way to change the background color used in a worksheet. You can, however, try a few ...

Discover More

Setting Page Margins

When getting ready to print your worksheet, you may want to take a moment to check what margins Excel will use on the ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is four less than 9?

2015-10-18 07:41:31

Pablo Quinteros

It seems to be a bug by Microsoft. This behavior with random changes on the row height is linked to the following settings:
File-Options-Advanced and then go to the group "Cut, Copy, and Paste". Have the 3 boxes checked.
That solved it for me.
For reference:
http://social.technet.microsoft.com/Forums/en-US/excel/thread/47740b73-9e06-442b-94af-5fbac0956add


2015-06-26 04:33:57

Jonross Jarvis

Hi Alan

Nice little macro there to get round the problem but is there any ideas as to what could be causing this issue in the first place. I much prefer fixing an issue then just working around it. :)

Many Thanks
JonRoss


2015-01-03 10:28:08

Jesse Fink

I often get something similar to this except it's only a few rows (2-3) in the worksheet where the row height is around 409.5. I am not on a network and I'm the only one to use the file.


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.