HasFormula



Bob Phillips and maybe many others have provided a UDF like

Function HASFORMULA(rng As Range)
If rng.Count = 1 Then
HASFORMULA = rng.HASFORMULA
Else
HASFORMULA = CVErr(xlErrRef)
End If
End Function

Can this function be changed to show an array of TRUE/FALSE values reflecting whether cells in a range holds formulas or not?

Hans Knudsen


.



Relevant Pages

  • Re: Feuding SORT - hasformula code
    ... its not wise to name your own functions and procedures the same as excel object methods ... ... in this case you have a UDF called HasFormula which also appies to a range object. ...
    (microsoft.public.excel.programming)
  • Re: Can you extract URL values from a list of cells?
    ... UDF is and can't find it in Excel help. ... cells and I've done some macros but that's about my limit. ... "Bob Phillips" wrote: ... >> I have a list of cells that are formatted as hyperlinks. ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Can you extract URL values from a list of cells?
    ... Here is a simple UDF you can use ... HTH ... Bob Phillips ... > I have a list of cells that are formatted as hyperlinks. ...
    (microsoft.public.excel.worksheet.functions)
  • RE: Can I auto change text to RED if a user overwrites a formula?
    ... Define the name HasFormula ... Then select all cells of your relevant sheet. ... Now all cells with a formula in them appear in normal black font while ... Apply the conditional format only for some cells if you do not want all ...
    (microsoft.public.excel.misc)
  • Re: PasteSpecial with formulas only question
    ... if hasformula() might be of help ... Don Guillett ... > I used pastespecial xlpastefiormulas in my code, however, it is pasting ... not only formulas but also values in other cells (if the copy range contains ...
    (microsoft.public.excel.programming)