30 Advanced Excel Tips for 2026

Excel Champs / Excel Formulas List / How to Hide Formula in Excel
By Puneet Gogia (Microsoft MVP)

How to Hide Formula in Excel

30+ Advanced Excel Tips for 2026

No spam. Only Excel Stuff. God Promise. 😊

Hiding a formula takes two steps: mark the cell as Hidden, then protect the sheet — the Hidden setting does nothing until protection is on. Select the cells with formulas, press Ctrl+1 → Protection, tick Hidden (leave Locked ticked too), click OK, then go to Review → Protect Sheet and confirm.

The formula bar now shows nothing when those cells are selected, and the cells can’t be edited. One thing that catches people out: every cell in a new sheet is Locked by default, so protecting the sheet freezes the entire worksheet, not just your formulas.

If you want the rest to stay editable, select all cells first (Ctrl+A), untick Locked, then apply Locked and Hidden to just the formula cells. To find formula cells before you start, use Home → Find & Select → Go To Special → Formulas.

Worth being clear about what this does and doesn’t do: it stops casual viewing and accidental edits, but sheet passwords are easily stripped by anyone determined, so it’s a deterrent rather than real protection.

If the formulas genuinely must not leave your hands, send a copy with the values pasted in place of the formulas instead.

How to Hide FORMULA in Excel | Super Trick

It happens sometimes that you send Excel files to others, and they make some changes to the formulas. Or, sometimes you simply don’t want to show the formula to others.

Hiding a formula is a simple way to do this so that others can’t see which formula you have used and how it gets calculated.

Now the question is, how can we hide the formula in a cell in Excel?

But before we do that, let’s be clear on this point: there are two ways to see a formula from a cell, first, by editing a cell, and second, from the formula bar.

Is there any way you can use to prevent both things? Yes, it’s there. In Excel, there is a simple way for this, and today, I’d like to share with you this simple trick.

Step 1: Un-Protect Worksheet

At this point, when you click on a cell, it shows you the entire formula in the formula bar.

  • First of all, you need to make sure that your worksheet is unprotected.
  • For this, go to the Review tab ➜ Protect group.
  • If you find an “Unprotect Worksheet” button there, that means your worksheet is protected and you need to unprotect it.
  • Click on that button to unprotect it.

If you have the “Protect Sheet” button there, that means your worksheet is unprotected. In that case, skip the above steps and start from here.

Step 2: Activate the Hide Formula Option

  • Now, select the cell or range of cells, or select all the non-contiguous cells where you want to hide formulas.
  • After that, right-click and select the Format Cells option (or press Ctrl + 1).
  • In the Format Cells dialog box, go to the Protection tab.
  • In the Protection tab, you have two checkboxes to mark: the first is Locked, and the second is Hidden.
  • Mark both of them and click OK.

These options which you have checked solve both of the problems which we have discussed above.

The Locked option restricts the editing of a cell, and the Hidden option hides a formula from the formula bar. Now the final step is to protect the worksheet.

By default, every cell in a worksheet is Locked, so once you protect the sheet, nobody can edit any cell. If you want others to still enter data in some cells (like input cells), select those cells first, open Format Cells ➜ Protection, and uncheck Locked for them before you protect the sheet.

Step 3: Protect Worksheet

  • Right-click on the worksheet tab and then click on “Protect Sheet”.
  • Here you can enter a password. It’s optional, but without it, anyone can unprotect the sheet. If you enter one, you need to enter it twice.
  • And in the end, click OK.

Now all the cells which you had selected have their formulas hidden from the formula bar.

If you send this file to someone they will not be able to see the formula or edit it unless this worksheet is unprotected.

How Do I Find Hidden Formulas?

Once you protect a file using the above steps, even you can’t see the formulas until you unprotect the worksheet. But if you just want to find where they are on a protected worksheet, you can use the “Go To Special” option.

  • Go to Home Tab -> Editing -> Find & Select -> Go To Special.
  • Select the “Formulas” option, keep all four sub-options (Numbers, Text, Logicals, Errors) checked, and click OK.
  • Once you click OK, Excel will select all the cells from the worksheet where you have formulas.

Hide a Formula without Protecting a Worksheet: I’m sure you have this thought in your mind: how can I hide a formula without protecting a worksheet? I’m afraid there is no other method for this. You need to go this way. The only possible thing which I know is to create a macro code that runs when the workbook opens and hides the formula bar. But again, this is not a permanent solution.

Unhide Formulas

  1. First of all, go to Review ➜ Unprotect Sheet and enter the password if there is one.
  2. After that, select the cells, press Ctrl + 1, and go to the Protection tab.
  3. In the end, uncheck Hidden and click OK.

Hide Formulas Using VBA

If you need to do this on many sheets, the following code hides all the formulas on the active sheet and then protects it. It only changes the cells that have formulas, so the other cells keep their Locked setting:

Sub hide_formulas()
On Error Resume Next ' the sheet may have no formulas
ActiveSheet.Cells.SpecialCells(xlCellTypeFormulas).FormulaHidden = True
On Error GoTo 0
ActiveSheet.Protect Password:="1234"
End Sub

Change the password in the code to your own. Keep in mind that sheet protection is meant to stop changes by mistake; it’s not strong security, so don’t rely on it for sensitive data.

Conclusion

This option not only helps you hide formulas but also helps if you have any crucial calculations which you want to hide from others.

Until someone has the password, formulas are hidden and safe. I hope this tip will help you to manage your worksheets.

Have you ever tried to hide a formula before? Please share your views with me in the comment section; I’d love to hear from you. And make sure to share this tip with your friends.

Frequently Asked Questions

Does hiding a formula hide the result too?

No. The cell still shows the result of the formula. Only the formula in the formula bar is hidden.

Can I hide formulas but still let others enter data?

Yes. Before you protect the sheet, uncheck Locked for the input cells in Format Cells ➜ Protection. Then others can type in those cells, while the formula cells stay hidden and locked.

Why can I still see the formula after checking Hidden?

The Hidden option works only after you protect the worksheet. Go to Review ➜ Protect Sheet, and the formulas will disappear from the formula bar.

Puneet Gogia

Written by

Puneet Gogia

Microsoft MVP — Excel · Founder, Excel Champs

Twelve years of teaching Excel, and a decade before that using it as a data analyst. Every tutorial here is written from a file I actually built.

3M+ readers helped
1,000+ tutorials written
Since 2015 teaching Excel

29 thoughts on “How to Hide Formula in Excel”

  1. Very Good Tutorial
    I want more Tutorials on Excel Macros And VBA
    through my e-mail address
    thank you

    Reply
  2. This is really helpful and although I’ve been asking myself this question for a number of years have never realised that such a straight-forward solution was available. Thanks again – you are brilliant!

    Reply
  3. Hi Puneet,

    Thanks a lot for this trick, i just learn this from you, i haven’t done before.

    Once again, thanks.

    Henry

    Reply
  4. This is wonderful!
    Please give the macro / VBA code which runs at the opening of the workbook and hide formula bar.

    Reply
  5. I send out many reports. I set it up to run a macro to copy > paste special > values and save as file name + date before it is attached to the email. That way I can always find the issue date when someone has a question and the formulas are no longer a problem.

    Reply
  6. Very useful tip.

    I had wanted to hide formulas in excel but didn’t know how. I had given up on this.

    Reply
      • Michael,
        ;;; have 2 issues
        1. It will hide the text in the cell then what the person will read to whom report has been sent.
        2. If the person whom report is sent knows this trick he will be able to read your formula and can change it too

        Reply
  7. Even if you hide, Ctrl+Tilde will show the formulas 🙂

    Reply
  8. That’s nice. However, what if we want to hide formula in a particular column of an Excel Table whose range may increase with new rows being added in the table. Is there a way to do so ?

    Reply
    • The problem comes up when we protect our worksheet. In that case, we can’t able to expand our table automatically.

      Reply
  9. Yes I normally use this formula hiding option in almost all of my sheets from last 5-6 years. It is quite useful feature the only issue is to remember so many passwords.
    If their is any way to decode the password if forgotten?

    Reply
    • There is a way but bit messy, try to write about it.

      Reply
      • we can use workshert selection change code….
        if target afdress $A$65535 then
        application.formulabar.display = false
        note: means if user selects a cell rather than
        a65535 the formula bar will be hidden.
        i think this will help…..
        waiting for update.

        Reply
          • Michael,
            ;;; have 2 issues
            1. It will hide the text in the cell then what the person will read to whom report has been sent.
            2. If the person whom report is sent knows this trick he will be able to read your formula and can change it too

        • This code doesn’t work.
          tried this also but didn’t work:
          Application.FormulaBarHeight = 0
          or
          Application.FormulaBarHeight = false

          Reply

Leave a Comment