ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   gformula to find formulas (https://www.excelbanter.com/excel-programming/292865-gformula-find-formulas.html)

GARY

gformula to find formulas
 
I need a formula that references another cell and tells me
whether that cell has a formula or a value in it.
Any ideas??
Thanks.

Frank Kabel

gformula to find formulas
 
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

Now enter the following in A2 to check A1:
=IF(is_formula(A1),"A1 is a formula","A1 is a value")

--
Regards
Frank Kabel
Frankfurt, Germany

gary wrote:
I need a formula that references another cell and tells me
whether that cell has a formula or a value in it.
Any ideas??
Thanks.



All times are GMT +1. The time now is 06:54 PM.

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