Hiding and protecting formulas is currently not supported in Excel Online.
If you have the Excel desktop application, you can use the Open in Excel button to open your workbook to hide and protect your formulas from being viewed or changed there. Here’s how:
Click Open in Excel and hide and protect formulas.
For news about the latest Excel Online updates, visit the Microsoft Excel blog.