View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default How to detect if a cell is formula

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.).

--
Regards
Frank Kabel
Frankfurt, Germany


H. Zhu wrote:
How to tell if a cell has formula only?

Thanks in advance.