View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 1,726
Default Determining if a range of cells is missing a formula

Bob,

That formula just checks a cell for a formula, so it can only return True or
False. Deleting a formula doesn't force a #VALUE.

Do you mean if they delete the row or column containing the cell? If so, the
worksheet formula changes to =IsFormula(#REF), so there is not much you can
do other than correct the formula, or use =isformula(INDIRECT("A1")), but it
will point to the new A1 if the original A1 gets deleted.

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"Bob" wrote in message
...
I have a range of cells containing formulas. I'm trying to write a UDF
that
will search the range and return either TRUE or FALSE if one or more cells
are missing the formula (due to someone inadvertently deleting them):

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

Unfortunately, the UDF returns #VALUE! when a formula is missing. I would
appreciate any help in fixing the aforementioned UDF.
Thanks, Bob