return formula type?

  • Thread starter Thread starter mark
  • Start date Start date
M

mark

I would like to return the formula type of a given cell.

For instance, I want to be able to tell whether the
contents of the cell is a typed in number, or a formula.

In Lotus (which I used to use quite some time ago now), it
was:

@cell("formulatype";a1)

That would return 'v' for a simple number, and 'fv' for a
number that was a formula.

Is there something similar in Excel?

Thanks.
 
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(A1)

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