If you wish to hide the formula in your excel sheet, follow the below approach:-
Please not that this will only hide the formulas not the the result fetched by the formula
After this, formulas will not be visible – neither in cell nor in formula bar.
1) Select the range / cells containing the formulas and need protection.
2) Right click and choose format cells
3) Go to Protection Tab
4) Select LOCKED and HIDDEN CheckBox. (Locked check box restricts editing of cell)
5) Click OK
6) Press key combination Alt + T + P + P
7) You’ll see Protect Sheet option window
8) Apply password if required. ( Not mandatory)
9) Click OK.
To show the formulas again, Just press the above mentioned key combinatin again
Note: -Locking cells or hiding formulas has no effect until you protect the worksheet.