View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Value or formula?

You could use a custom function:

Function IsFormula(rng As Range) As Boolean
IsFormula = rng.HasFormula
End Function


syntax is
=Isformula(A1)

or
=--Isformula(A1)
to get a 1 or 0.

For more on macros and UDF's.
http://www.mvps.org/dmcritchie/excel/getstarted.htm


"Eric" wrote:

Refering to General Question

Does anyone know how to differentiate the cell formed by a value or a formula?
such as in cell a1 = 7 [value only] and in cell b1 = 3 + 4 [any formula]
If the cell contains value, then return 0, else
If the cell contains formula, then reurn 1.
In this case, a2 = 0 [return], because a1 contains value and
b2 = 1 [return], because b1 contains formula
Does anyone have any suggestion?
Thank you in advance
Eric