View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions,microsoft.public.excel.worksheetfunctions
Harlan Grove
 
Posts: n/a
Default Function: cell contents formula or value?

J.Smith wrote...
It seems like a trivial thing, but I seem to be unable to locate a worksheet
function that allows me to determine, if a given cell contents is a formula
or a value.


No built-in function to do this. You could use VBA to write a
user-defined function. UDFs need to go into general VBA modules, not
class modules.

Function isformula(r As Range) As Boolean
isformula = r.Cells(1).HasFormula
End Function