ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to detect if a cell is formula (https://www.excelbanter.com/excel-programming/299235-re-how-detect-if-cell-formula.html)

Frank Kabel

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.



All times are GMT +1. The time now is 11:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com