How do I highlight cells on a worksheet that contain formulas

G

Guest

Is there a way to use conditional formatting to highlight any cells on a
worksheet that contain a formula?
 
B

Bob Phillips

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)
 
D

Dave Peterson

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

Similar Threads

Excel Highlighting duplicates 0
Highlight cells 1
Excel VBA 1
Format based on cell contents being a formula or not 2
Conditional Format 1
Cell highlighting question 4
How to colour highlight empty cell 2
Excel Excel Conditional Format 2

Top