Link to home
Start Free TrialLog in
Avatar of Frank Freese
Frank FreeseFlag for United States of America

asked on

Hide formulas in formula bar

Folks,
I know I can hide the formula bar but here's my objective.
I am trying to teach my youngest son more about Excel. There is a section of tabs that are for exercises that need to be solved. If he gets the incorrect answer then his formula or function is incorrect and he get some message like "Try again - wrong results"
I'm considered conditional formatting but also looking for an alternative solution.
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Not exactly what you asked for but here's a little UDF that will show a formula in a cell.

Function GetFormula(cel As Range) As String
GetFormula = cel.Formula
End Function

Open in new window

Avatar of Frank Freese

ASKER

Martin,
I've got that already but thanks.
Hi fh,

On a cell you want the formula hidden, go to the Format Cells window (control 1 or right-click/Format Cells or Home/Cells/Format/Format Cells). On the Protection tab are checkboxes for Locked and Hidden.  When the worksheet is Protected, "Hidden" hides the formula, and "Locked" makes the cell unable to be changed.

To protect your sheet, go to the Home tab, the Cells group, the Format button, then Protect Sheet. Choose a password (or don't), and press OK. The cells you chose to hide formulas now display nothing in the formula bar.

Matt
Matt,
However, outside of hiding the formula bar, is there away to keep a formula from displaying in the formul bar....
fh,

Yes, exactly as I described above. You need to check the protection "hidden" checkbox for every cell you want to hide the formula, then protect the sheet.

Matt
For example, if A1 = 1 and B1 = 3 then sum in C1 = 4. However, if the sum is anything other than 4, I would like the user to know that their formula is incorrect. Conditional formatting could get me there, but I was looking for some thing different. In other word, error checking the results on a cell
ASKER CERTIFIED SOLUTION
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I'm going to go with another command bar that will check the answer
Thanks folks - great ideas
You're welcome and I'm glad I was able to help.

Marty - MVP 2009 to 2013