Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. 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: Preventing Changes to Formatting and Page Size.

Preventing Changes to Formatting and Page Size

Written by Allen Wyatt (last updated December 4, 2021)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365


April described an all-too-common situation in an office environment: you create a worksheet, get it looking just right, protect it, and then allow others to make changes to the unprotected cells. When you get the worksheet back, there have been changes to the page setup and the formatting that makes the worksheet look different than what you intended.

There are a couple approaches you can take with this problem. The first is to divide your input and output into separate sheets. Create a worksheet where the user can enter their data, and then create an output worksheet that you use to print the data. The output worksheet simply grabs data from the input worksheet through the use of cell references and formulas. Since the user doesn't have access to the output worksheet, then it can't get mucked up.

If the worksheet has been protected, Excel allows you to explicitly allow or prohibit formatting changes when you turn on the protection. Prohibiting formatting changes doesn't protect you all the time, however. One exception is if the user copies formatted cells from another worksheet and pastes them into unlocked cells in the protected worksheet. There is no way to prevent this, short of using the input sheet/output sheet method already described.

As far as page setup is concerned, Excel allows the page setup (margins, etc.) to be modified, even on a protected worksheet. The best workaround is to create a macro that will set the page setup configuration as you want it, and have the macro run automatically before the worksheet is printed. (Just assign the macro to the BeforePrint event for the workbook.)

If the other user still monkeys around with the settings in a way that rendered the output of the workbook non-standard or even unusable, you may need to resort to non-Excel means to assure compliance. :>)

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (1084) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: Preventing Changes to Formatting and Page Size.

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

Left and Right Aligned on One Line in a Label

If you need to put information on a label that has both left- and right-aligned information on the same line, it can be ...

Discover More

Creating Compound Characters

Word provides access to a wide variety of characters either from the keyboard or from the Symbol dialog box. Up and above ...

Discover More

Using Tags with Document Files

Tags are a way for you to store keywords or metadata with your document files. They can be helpful when you are trying to ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More ExcelTips (ribbon)

Specifying Superscript Text

Applying different formatting to the text within a cell can seem a bit confusing. This is certainly the case when it ...

Discover More

Deleting Unwanted Styles

Custom styles can be a great help in formatting a worksheet. You may, at some point, want to get rid of all the custom ...

Discover More

Applying Table Formats

Want to format your data tables in a hurry? It's easy to do if you use the built-in table formatter provided in Excel.

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}] (all 7 characters, in the sequence shown) 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 one less than 9?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


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.