Can I set up Excel highlight a non formula cell?

M

mrj1701

Is there any way to set up a sheet to either highlight or put a border around
a cell that is only a number and not a formula, and if possible is there a
way to turn that on and off?
 
B

Bob Phillips

You could add simple UDF

Function IsFormula(rng As Range)
If rng.Count =1 Then
IsFormula = rng.hasformula
endif
End Function

and then use that in a Conditional Formatting formula in say cell F1

=AND($A$1<>"",IsFormula(F1

which turns it on or off if A1 is empty or not.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Top