How to Restrict and Validate Data in Your Excel Financial Model

By Danielle Stein Fairhurst

After you finish building a financial model, you may be tempted to keep it to yourself, because you don’t want anyone to mess up your formulas or use the model inappropriately. Models should be collaborative, but you need to build your model in such a way that it’s easy for others to use and difficult to mess up. One great way of making your model robust for others to use is to apply data validations and protections to the model. This way, the user can only enter the data he’s supposed to.

Restricting user data entry in your financial model

For a practical example of how to use data validation, let’s take this Project Costings Analysis.

financial modeling using absolute referencing
Calculating daily staff rate using absolute referencing.

Your colleague is using the model you’ve built and he can tell by the way in which cell D3 has been formatted (with shading) that you expected people to make changes to it. He’s not sure anymore how many days this project is going to continue, so he types TBA into cell D3 instead. As soon as he types TBA, that really messes things up! As you can see below, the formulas you’ve already built were expecting a number in cell D3, not text.

text causing error in financial model
Text in an input causing errors.

Instead of allowing the user to put anything into any cell, you can change the properties of this cell to allow only numbers to be entered. You can also change it to allow only whole numbers or numbers in a given range.

Follow these steps:

  1. Download File 0601.xlsx and select the tab labeled 6-17.
  2. Select cell D3.
  3. Go to the Data tab on the Ribbon and press the Data Validation icon in the Data Tools section.

    The Data Validation dialog box appears.

  4. On the Settings tab, in the Allow drop-down list, select Whole Number; in the Data drop-down list, select Greater Than; and in the Minimum field, enter 0.

Now only allow whole numbers greater than zero can be entered into cell D3. Try entering text such as TBA. Try entering a negative value. Excel won’t allow it, and an error alert will appear.

If you want, you can enter a warning message on the Input Message tab of the Data Validation dialog box. For example, you might want the following message to appear: “Warning! Only enter numerical values.” On the Error Alert tab, you can enter another message that appears if someone ignores the warning and tries to enter invalid text.

Creating drop-down boxes with data validations in your financial model

Not only does the data validation tool stop users from entering incorrect data into your model, but you can also use it to create drop-down boxes. In the Data Validation dialog box, from the Allow drop-down list, select List. In the Source field, enter the values you’d like to appear in the list with a comma between them such as Yes, No. A simple drop-down list is created in cell B12 with only two options: Yes and No. The user can’t enter anything else.

Data validation in financial model
Using data validation to create a simple drop-down list.

No one can enter a value in a cell that goes against your data validation rules, but it’s still possible to paste over a cell that is restricted by data validation. In this way, users can inadvertently (or deliberately) enter data into your model that you did not intend.

You can also create a drop-down list that links to existing cells within the model. For example, below, you don’t want the users to include a region that is not included in the list shown in column F. So you can use a data validation list, but instead of typing in the values (which would be very time-consuming), you can link to the range already containing the regions — $F$2:$F$5 — which is a much quicker way of inserting a drop-down list.

data validation to create dynamic list in financial model
Using data validation to create a linked, dynamic drop-down list.

Because you’ve linked the drop-down list, this drop-down is now dynamic. If someone edits any of the cells in the range F2:F5, the options in the drop-down list will automatically change.

Protecting and locking cells in your financial model

You can also add protection to your model by going to the Review tab on the Ribbon and clicking the Protect Sheet button in the Changes section. Enter a password if you want one, and click OK. This will protect every single cell in the entire worksheet, so no one will be able to make any changes at all

If you want users to be able to edit certain cells, you’ll need to turn off the protection, highlight those cells (and only those cells you want to change), go to the Home tab on the Ribbon, and click the Format button in the Cells section. Deselect the Lock Cell option that appears in the drop-down list. Turn the protection back on again, and only the cells that have been selected will be unlocked.

Keep in mind that it’s reasonably easy to crack an Excel password (search the Internet for Excel password cracker), so if someone wants to get in and make changes to your protected model, he can. I recommend that you treat Excel passwords as a deterrent, not a definitive security solution.