Conditional formatting based on what function is used in a cell.

G

Guest

Is there a way to use conditional formatting in such a way so I can highlight
cells that use a particular formula?
For example, my spreadsheet uses a lot of INDIRECT() formulas in different
variations, but I would like to highlight them all.
Thanks in advance.
 
B

Bob Phillips

VBA would do it

Public Sub Test()
Dim cell As Range
For Each cell In ActiveSheet.UsedRange
If cell.HasFormula Then
If InStr(cell.Formula, "INDIRECT") > 0 Then
cell.Interior.ColorIndex = 38
End If
End If
Next cell
End Sub

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

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

Top