Finding formulas

G

Guest

Do you have a formula or something that I can use in
conditional format to tell if a cell contains a formula.
 
P

Peter Atherton

-----Original Message-----
Do you have a formula or something that I can use in
conditional format to tell if a cell contains a formula.
.
You could use this macro

Sub test()
Selection.SpecialCells(xlFormulas).Select
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
Range("A1").Activate
End Sub


Peter Atherton
 
G

Gord Dibben

Copy/paste this UDF to a general module in your workbook.

Function IsFormula(cell)
Application.Volatile
IsFormula = cell.HasFormula
End Function


CF>Formula is: =IsFormula(A1)

Pick a Pattern from the Format button.

Gord Dibben Excel MVP
 
Top