Function to determine formula or static content in cell

P

Pozzo

Is there an Excel function, or one that I could easily create in VBA
that would determine if a cell contains a formula or user-entered data
I am facing a problem with circular references and I think if I can d
this then I might be able to dynamically avoid the problem arising.

Thanks for help you might be able to give
 
F

Frank Kabel

Hi
you may try the following UDF (put in a module of your workbook)

Function is_formula(rng As Range)
is_formula = rng.HasFormula
End Function

use it like
=IS_FORMULA(A2)

Note: not much error checking included (e.g. multiple cells as range
parameter, array formulas, etc.).
 
Top