Function to determine formula or static content in cell

  • Thread starter Thread starter Pozzo
  • Start date Start date
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
 
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.).
 

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

Back
Top