Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Function IsFormula(rng As Range) As Long
For Each r In rng If Not r.HasFormula Then IsFormula = IsFormula + 1 End If Next End Function -- --- HTH Bob (change the xxxx to gmail if mailing direct) "Gary''s Student" wrote in message ... Function IsFormula(rng As Range) As Boolean IsFormula = False For Each r In rng If Not r.HasFormula Then Exit Function End If Next IsFormula = True End Function -- Gary's Student "Bob" wrote: 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Dynamic Ranges using non-contiguous cells and dependent on a cell value | Excel Worksheet Functions | |||
Pasting a formula in multiple cells without changing the range | Excel Discussion (Misc queries) | |||
Match then lookup | Excel Worksheet Functions | |||
Match function...random search? | Excel Worksheet Functions | |||
Formula help for using a range of cells! | Excel Worksheet Functions |