LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,726
Default Determining if a range of cells is missing a formula

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Ranges using non-contiguous cells and dependent on a cell value Carlo Paoloni Excel Worksheet Functions 2 November 29th 06 07:29 PM
Pasting a formula in multiple cells without changing the range Jeff Wheeler Excel Discussion (Misc queries) 3 June 15th 06 04:52 PM
Match then lookup Tenacity Excel Worksheet Functions 9 December 3rd 05 05:30 AM
Match function...random search? Les Excel Worksheet Functions 10 July 28th 05 11:54 AM
Formula help for using a range of cells! Sukismomma Excel Worksheet Functions 5 January 27th 05 02:34 AM


All times are GMT +1. The time now is 02:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"