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

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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)
 
Back
Top