Protect Cells from Any Unauthorized Changes in Excel

Protecting your Excel Files from any unauthorized changes is crucial.

When you email or share your Excel files with others, there are always chances that they may change some key information, that shouldn’t have been changed.

This can happen because, by default, all cells in Excel are available for modifications by anyone having access to the Excel file.

But the strange thing is that if you were to check Excel’s cell protection setting under Format Cells, you’d find that each cell is marked as Locked.  However, Microsoft is quick to inform you that

Locking cells or hiding formulas has no effect until you protect the sheet.

Quite a strange setting, I believe. However, you can use this setting to your advantage.

Scenario: Preparing a Protected Travel Expense Claim Form in Excel.

Let’s say you are creating a Travel Claim Form for all staff to use in the company when they use their own transport for office meetings or customer visits.

You’d only want the staff to key in their travel expenses, dates, and the type of expenses. You wouldn’t want them to modify the rate which you use to calculate the claim amount. However, you would still want yourself or HR manager to be able to adjust the rate periodically, based on the policy.

To achieve this, you will have to create an Excel Spreadsheet, with careful consideration of the data protection. Your Excel file must have:

  1. Some cells are protected completely (no changes allowed by anyone) These could be formulas and any master data like names of departments, cities etc. More like master data that does not change often.
  2. Some cells that can only be modified by you or HR. These could be the Rate of reimbursement etc. You could even set a password to allow only authorized people with the right password to key in this information.
  3. Some cells that anyone can modify. These would be the cells where the staff is going to key in their expenses. Mostly, such cells would be the ones accepting the data entry values only.

Here are the detailed steps that you can take to protect the information and make a spreadsheet that everyone can use, without fear of getting inadvertent changes to the file, and maintaining full privacy and security.

Step 1: Unlock all Cells in your Excel Template.

To do this, Select All Cells (you can press Control A or press the small rectangle above row 1 on the top-left area of the spreadsheet. Once all cells are selected, right-click to activate the menu, and go to Format Cells. Shortcut is Control 1 for this option.

Now move to the Protection tab, and uncheck the Locked checkbox.

Click OK and come out of this popup. Now all cells are unlocked.

Step 2: Lock the Calculations & Totals Row/Columns

Select the cells that have any calculations. To select multiple cells, highlight them, and hold the Control key to multi-select several formula and total ranges.

Now go to Format Cells by right-clicking, or press Control 1 again. This time, you can check both checkboxes on the Protection Tab. Lock and Hide the formulas and cells completely.

Step 3: Select Cells That can only be modified by authorized Users

Finally, it is time to select the cells that need to be protected from unauthorized changes. So select those cells, again by using the Control Key to multi-select the cells.

Once the cells are selected, go to Format Cells > Protection Tab, and Lock them. Click OK.

Step 4: Set a Password to cells that only an Authorized User can modify.

Go to Review Tab on the Excel menubar. Select Allow Users to Edit Ranges, from the Changes group on this menu.

Click New, and key in a name for the cell range. Set a password that will be required to be keyed in whenever anyone tries to change such cells. You have to key it in 2 times to confirm the password.

Step 5: Protect the Sheet

The previous 4 steps will have no effect until you protect the entire sheet.

To do so, go to Review > Protect Sheet.

You can then, optionally, set a password. Although I say optionally, I’d recommend that you definitely do it as a best practice. otherwise, any user can modify your template, simply by unprotecting the worksheet, make any change, and protect it again.

You will be required to key in the password twice, to confirm that it is the correct password.

Step 6: Test the Protected Sheet, and deploy it.

Now you are ready to test your protected Excel Template.

Users should be able to key in their particulars, expense, mileage etc. But they would not be able to see the formulas behind the calculations.

Neither will they be able to edit or change these totals.

And best of all, they can never edit the reimbursement rate. Even if they click it inadvertently, Excel will ask them for a password.

As for HR, they should have the password set by you. With this password, they should be able to edit the reimbursement rate, and then save the template for use in the future, with the newly revised rates.

Voila, quite a sophisticated Excel template, with worksheet protection, hidden formulas and authorised user-editable cells created in no time.

Give it a try. I’m sure you’d love this simple method to protect your data files from unauthorised changes.

Written By Vinai Prakash,
Founder of ExcelChamp.Net & Intellisoft Systems
Vinai has over 30 years of experience working with spreadsheets and teaches Excel, Advanced Excel, Excel Data Analysis, Excel Dashboarding Techniques at Intellisoft Systems in Singapore, and online at ExcelChamp.Net.

 

 

 

 

Power BI Creates Left Joins By Default

Microsoft Power BI is a great tool to visualize data quickly and create management dashboards.
We can load data from almost any data source, and create relationships between different tables, just like in a traditional RDBMS (Relational Database).

Join appear as Equal Joins in Power BI.

This means that when we join 2 or more tables, with one table being the dimension table, and the other the Fact table, then the dimension filters the fact table records that match the criteria (which can come from a Dimension Table, Page filter, Report filter, or through the interactions between the different visualizations)

So a Matrix report or a Chart in Power BI will only show values from the Transaction table where the row from the dimension matches.

  • If we want to see all categories from the Product table, we can just select a category.
  • This will display all distinct categories, irrespective of whether there were any sales for these product categories or not.
  • However, as soon as we bring in the Sales Amount from the Sales Fact table, it filters down the sales amount for each category and then summarizes it.
  • This means that only the categories where there were sales will be displayed.
  • And the categories where there are no sales will be ignored and hidden.

But by tweaking the Category to display Values With No Data, we can see all categories, with or without corresponding sales.

See the step by step video to learn how to enable the Show Values With No Data option in Power BI.

I hope you like the tip. Do like it, and subscribe to the ExcelChamp’s YouTube Channel for more PowerBI Tips like this.

Thanks,
Vinai

Viewing the Formula in Another Cell in Excel

Applicable For: This tip works in Microsoft Excel 2013 & Excel 2016, and Office Excel 365 (for both Windows & Mac Editions)

Prior to the Excel 2013 edition, to view all the formulas in a given worksheet in Excel, we had to use the View Formulas button, or use the nifty shortcut I highlighted in another post on this topic – View All Formulas in Excel with a Single Click.

But from the Excel 2013 and onward editions (including Excel 2016 – for Windows & for Mac), we have another better way to view the formulas used in calculations. This method is fantastic, because it allows you to see the formulas, without having to flip the switch, and see only values or only formulas.

In this technique, the original values and formulas can stay where they are. We can simply use the newly introduced Excel function in a new cell, which will then show you the formula of any given cell pretty easily.

This new function is called FORMULATEXT.

=FORMULATEXT(cell_reference to a cell containing a formula)

FormulaText Demo from ExcelChamp.net - By Vinai Prakash

With this new function, you can see the formula within any other Excel cell, without flipping up the on/off option. It allows you to see the value and see the formula, all at the same time. Much better than the chicken only or egg only options…

Want to Improve Your Excel Skills?

Learn the Key Features of Excel Quickly & Easily, by Joining the
Online Training on Basic / Intermediate Excel.

To Get Most out of Excel, Learn the  Pivot Table techniques in our
Pivot Table Masterclass Training
!


This has been specially great while teaching or showing off stuff to someone. Now you can use complex formulas, and the FormulaText function will show the formula, while the original value stays put, making it easier to understand the formula and its working, while having the value displayed directly.

Great, simple tip. I hope you like it!

Cheers,
Vinai Prakash,
Founder: ExcelChamp.Net – Effective Tips to Simplify Excel, Every Day!

Are you facing any problem in using Excel? Any Question?

You have come to the right place. Tell us your needs. We’ll be glad to help you!