How do I highlight cells on a worksheet that contain formulas

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to use conditional formatting to highlight any cells on a
worksheet that contain a formula?
 
Add a custom function like


Function Is(rng As Range) As Boolean
If rng.Count > 1 Then
IsFormula = CVErr(xlErrValue)
Else
IsFormula = rng.HasFormula
End If
End Function


and use =IsFormula(A1) in the CF


--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)
 
Just a typo alert:

Function Is(rng As Range) As Boolean
should be:
Function IsFormula(rng As Range) As Boolean
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top