If you don’t want them to change anything, you have the option to either protect the entire worksheet/workbook or protect certain cells that have important data (that you don’t want the user to mess up). But even when you protect the worksheet, the end-user can still click on a cell and see the formula that’s used for calculations. If you want to hide the formula so that the users cannot see those, you can do that as well. In this exact tutorial, I will show you how to hide formulas in Excel in a protected worksheet (so that’s it’s not visible to the user). So let’s get started!

## How to Hide All Formulas in Excel

When you have a formula in a cell, a user can see the formula in two ways: When you hide the formulas (as we’ll soon see how), the users won’t be able to edit the cell as well as not be able to see the formula in the formula bar. Suppose you have a data set as shown below where you have the formula in column D.

Below are the steps to hide all the formulas in column D: The above steps would protect the entire worksheet in such a way that if you click on a cell that has a value you would see the value in the formula bar, but if you click on a cell that has a formula, no formula would be shown in the formula bar.

And since the worksheet is protected, you would not be able to double-click on the cell and get into the edit mode (so the formula is hidden that way as well). While this method works fine, you need to know that the sheets/cells that are protected in Excel can easily be unlocked by the user. Any tech-savvy user can easily break into your protected workbooks (a simple Google search will give them multiple ways to break the protected worksheet). It’s not straight-forward, but it’s not too hard. But if you’re working with less tech-savvy users, adding a password should be enough.

## How to Only Hide Formulas in Excel (And Keep Rest of the Cells Editable)

In the above method, I showed you how to protect the entire worksheet (including the cells that have don’t have a formula in it). But what if you don’t want to protect the entire worksheet? What if you only want to protect the cells that have formulas and hide these formulas from the user. This could be the case when you want the users to input data (such as in a data entry form) but not be able to edit the formula or see it. This can easily be done as well. Unlike the previous method, where we protected all the cells in the worksheet, in this method we would only select the cells that have the formulas and protect these cells. The remaining of the worksheet would remain open for the user to edit. Suppose you have a data set as shown below where you only want to protect the formulas in column D (which has formulas).

For a cell to be protected, it needs to have the ‘Locked’ property enabled, as well as the protection enabled from the ribbon. Only when both of these happen does a cell truly becomes locked (i.e., can’t be edited). This also means that if you disable the lock property for a few cells, these could still be edited after you protect the worksheet. We will use this concept where we will disable the locked property for all the cells except the ones that have formulas in it. Let’s see how to do this.

### Step 1 – Disable the Lock Property for all the Cells

So, we first need to disable the Locked property for all the cells (so that these can’t be protected) Below are the steps to do this: The above steps have disabled the locked property for all the cells in the worksheet. Now, even if I go and protect the sheet using the option in the ribbon (Review » Protect Sheet), the cells would not be completely locked and you can still edit the cells.

### Step 2 – Enable the Locked and Hidden Property only for Cells with Formulas

To hide the formula from all the cells in the worksheet, I now need to somehow identify the cells that have the formula and then lock these cells. And while locking these cells, I would make sure that the formula is hidden from the formula bar as well. Below are the steps to hide formulas:

### Step 3 – Protecting the Worksheet

In the process so far, the Locked property is disabled for all the cells except the ones that have a formula in it. So now, if I protect the entire worksheet, only those cells would be protected that have a formula (as you need the Locked property to be enabled to truly lock a cell). Here are the steps to do this: The above steps would lock only those cells that have a formula in it and at the same time hide the formula from the users. The users won’t be able to double-click and get into the edit mode as well as see the formula in the formula bar.

## How to Hide Formulas Without Protecting the Worksheet

If you’re wondering whether you can hide the formulas in Excel without protecting the sheet, unfortunately, you can’t. While you can get this done by using a complex VBA code, it would be unreliable and can lead to other issues. Here is an article that shares such a code (use it if you really really can’t do without it) As of now, the only way to hide the formulas in Excel is to protect the sheet and also make sure that the hidden properties enabled for the cells that have the formula. I hope you found this tutorial useful. You may also like the following Excel tutorials:

How to Lock Cells in Excel How to Hide a Worksheet in Excel (that can not be unhidden) How to Unhide COLUMNS in Excel How to Unhide Sheets in Excel How to Hide or Show Formula Bar in Excel?