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 Office 365. You can find a version of this tip for the older menu interface of Excel here: Preventing Changes to Formatting and Page Size.
Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!
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 MoreWhen you use the sorting tool, Excel tries to automatically figure out if your data includes a header row or not. Here ...
Discover MoreExcel allows you to adjust not only the horizontal alignment of values in a cell, but also the vertical alignment. This ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2019-12-02 04:16:23
Ken varley
2nd submission of my comment. (I felt that the first a bit confusing)
I had this situation, and my workaround was to create a hidden worksheet called BLANK. As the name suggests, it is a blank form. It is identical to the sheet that the user to needs to complete.
The user inputs data to a visible sheet called FORM
When the user has finished his input in FORM, he presses a button to update the data. The sheet is then printed and the data is extracted to be used elsewhere.
All cells in BLANK are then copied & pasted into FORM, thus overwriting anything that the user might have changed.
2019-12-02 04:11:21
Ken varley
I had this situation, and my workaround was to create a hidden worksheet called BLANK. as the name suggests, it was a blank form for the user to complete.
The user fills the blanks in a sheet called FORM
When the user has finished his input in FORM, he presses a button called UPDATE. The sheet is then printed and the data is extracted to be used elsewhere.
All cells in BLANK are then copied & pasted into FORM, thus overwriting anything that the user might have changed.
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.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2021 Sharon Parq Associates, Inc.
Comments